Attribute VB_Name = "WriteStockPrice" Option Explicit Function run(row as integer, content as string) On Error GoTo eh Worksheets(TARGET_SHEET).Range(COL_STOCK_PRICE & CStr(row)).Value = content Done: exit Function eh: debug.print "WriteStockPrice" debug.print row debug.print content End Function