View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BigBrother BigBrother is offline
external usenet poster
 
Posts: 8
Default Run-time Error '1004'

Hi,

I have a simple function (below) that generates the following message
"Run-time Error '1004': Application-defined or object-defined error". Any
ideas on what I am doing wrong?

Thanks tons!

Public Sub Workbook_Open()

Application.VBE.ActiveVBProject.VBComponents.Item( "Module1").CodeModule.ReplaceLine 1, "TEST LINE"

End Sub