Check for existence of another macro

B

Brent B.

I'm aware of how to run another macro from a macro using
application.run("Macroname"), but how do you check for the existence of a
macro other than trying to run it and getting an error if it doesn't exist?

TYA,

Brent
 
H

Helmut Weber

Hi Brent,

first, I'd say, there is nothing wrong with
provoking an error and using the information
it returns, as long as you clear the error afterwards.
I use "on error goto -1" for it.

If it is just for learning purposes,
you may like to set a reference to the
Microsoft Visual Basic for Applications Extensibility library
and check all the code in all modules in all projects.

Pretty complicated, though.

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 

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