View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default programming to the vbe question

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