ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   programming to the vbe question (https://www.excelbanter.com/excel-programming/371238-programming-vbe-question.html)

Gary Keramidas

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




Tom Ogilvy

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





Gary Keramidas

programming to the vbe question
 
sorry, tom, not sure what you mean by scope?

--


Gary


"Tom Ogilvy" wrote in message
...
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







Tom Ogilvy

programming to the vbe question
 
Does that particular workbook/project (the one containing the code) have a
reference to the extensibility library. When looking at Tools=References in
the VBE, what you see is specific to the active project at the time you do
it.

--
Regards,
Tom Ogilvy



"Gary Keramidas" wrote:

sorry, tom, not sure what you mean by scope?

--


Gary


"Tom Ogilvy" wrote in message
...
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








Gary Keramidas

programming to the vbe question
 
yes it does. that's why i don't understand why it stopped working.

--


Gary


"Tom Ogilvy" wrote in message
...
Does that particular workbook/project (the one containing the code) have a
reference to the extensibility library. When looking at Tools=References in
the VBE, what you see is specific to the active project at the time you do
it.

--
Regards,
Tom Ogilvy



"Gary Keramidas" wrote:

sorry, tom, not sure what you mean by scope?

--


Gary


"Tom Ogilvy" wrote in message
...
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











All times are GMT +1. The time now is 03:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com