Attribute VB_Name = "WriteStatus" Option Explicit Function run( content as string) On Error GoTo eh Worksheets(TARGET_SHEET).Range("A1").Value = content Done: exit Function eh: debug.print "WriteStatus" debug.print content End Function