Distributing macros in ThisProject open event

R

RC

Hello, I have a macro that runs on project open event (a menu is
added) in the ThisProject object that needs to be distributed to other
files. How can this be easily distributed by VBA? I am already copying
over several other modules over to the Global.mpt.

Thank you for any assistance!

arectoo
 
J

Jan De Messemaeker

Hi,

I haven't found a way to do that, so I prefer to not use the Project Open
event; if you pout the code in an ordinary module, in a sub called
Auto_Open, it will also fire at open and it can be distributed.
HTH
 
R

RC

Hi Jan,

Thank you so very much! The following code worked. I'll follow this
method from now on.

Option Explicit

Sub Auto_Open()
AddMenu
End Sub

Sub Auto_Close()
DeleteMenu
End Sub

arectoo
 

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