onaction calls macro in second document

L

Luc Benninger

I have document (A) which contains some macros. In another document (B)
I am dynamically creating a CommandBarButton using VBAs AutoOpen
procedure. The buttons OnAction property should now call a macro from
the document A. But even if both documents are open, the macros in A
seem not to be visible???
How should the OnAction string look like? or do you see other posibilities?
Thanks in advance!
Luc
 
J

Jonathan West

Luc Benninger said:
I have document (A) which contains some macros. In another document (B) I
am dynamically creating a CommandBarButton using VBAs AutoOpen procedure.
The buttons OnAction property should now call a macro from the document A.
But even if both documents are open, the macros in A seem not to be
visible???
How should the OnAction string look like? or do you see other
posibilities?
Thanks in advance!
Luc

From one macro, you can call a macro in another open document or template
using the Application.Run method. There are details in the VBA Help.
 

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