View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default programming to the vbe question

do you still have a reference to the Extensibility Library within scope?

--
Regards,
Tom Ogilvy


"Gary Keramidas" wrote:

i used chip pearson's method to add, remove and test for a modules existence.
was working fine 2 days ago, now it doesn't work.
http://www.cpearson.com/excel/vbe.htm

keep getting method vbproject of object _ workbook failed, even if i just try to
add a module
i still have the "Microsoft Visual Basic For Applications Extensibility" option
in references checked.


Sub AddModule()
Dim VBComp As VBComponent

Set VBComp = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_S tdModule)
VBComp.Name = "Aopen"
Application.Visible = True
End Sub


was wondering if anyone had any ideas.



--


Gary