R
Rick Barnsley
Hi,
I'm trying to programmatically count the number of macros within an Office
document.
I haven't had much luck with finding a solution online.
I have tried accessing the VBAProjects through:
Application.VBE.VBProjects(1).VBComponents.Count
only to receive the error:
---------------------------
Microsoft Visual Basic
---------------------------
Run-time error '1004':
Programmatic access to Visual Basic Project is not trusted
---------------------------
OK Help
---------------------------
Is there another function I can call to return the number of available
macros for a given document?
Cheers,
Rick
I'm trying to programmatically count the number of macros within an Office
document.
I haven't had much luck with finding a solution online.
I have tried accessing the VBAProjects through:
Application.VBE.VBProjects(1).VBComponents.Count
only to receive the error:
---------------------------
Microsoft Visual Basic
---------------------------
Run-time error '1004':
Programmatic access to Visual Basic Project is not trusted
---------------------------
OK Help
---------------------------
Is there another function I can call to return the number of available
macros for a given document?
Cheers,
Rick