method vbproject of object workbook fail

G

Guest

I get this error every time The code activeworkbook.vbproject...... is used.

i have ticked the "Microsoft Visual Basic For Applications Extensibility 5.3". in references

can someone help
 
P

Patrick Molloy

You'll need to show us your code

The following for example
MsgBox ActiveWorkbook.VBProject.VBComponents.Count
works fine without any extra references.

Show us the context in which you use the object, and then
we may be able to identify and resolve your issue.

Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
I get this error every time The code
activeworkbook.vbproject...... is used.
i have ticked the "Microsoft Visual Basic For
Applications Extensibility 5.3". in references
 
G

Guest

Sub vbext_ct_StdModule()


MsgBox ActiveWorkbook.VBProject.VBComponents.Count


End Sub
 
C

Chip Pearson

In Excel, go to the Tools menu, choose Macros, the Security, then
the Trusted Publishers tab. There, ensure that "Trust access to
Visual Basic Project" is checked.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


Chrispy said:
I get this error every time The code
activeworkbook.vbproject...... is used.
i have ticked the "Microsoft Visual Basic For Applications
Extensibility 5.3". in references
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top