Using Userform in the Global Project

R

roadkill

I want to have a userform reside in my Global MS Project file and have it be
referenced/used via macros that also reside in the Global. I want this
happening as a result of the macro being run from any of a number of MS
Project schedule files. What I'm seeing is that MS Project always looks for
the form in the MS Project schedule file and ignores the Global form
(although code from the Global is clearly running). Can I force MS Project
to use the form in the Global or am I stuck putting the form in each of the
MS Project schedule files?

Thanks for any help,
Will
 
J

John

roadkill said:
I want to have a userform reside in my Global MS Project file and have it be
referenced/used via macros that also reside in the Global. I want this
happening as a result of the macro being run from any of a number of MS
Project schedule files. What I'm seeing is that MS Project always looks for
the form in the MS Project schedule file and ignores the Global form
(although code from the Global is clearly running). Can I force MS Project
to use the form in the Global or am I stuck putting the form in each of the
MS Project schedule files?

Thanks for any help,
Will

Will,
How are you setting it up? Virtually all of my macros and userforms
reside in my Global. All you should have to do is to first make sure the
module with the code is in the Global (either create it there or use the
organizer) and then set up a menu item or toolbar button to call that
code for any project file.

John
Project MVP
 
R

roadkill

John
I have the code that creates and deletes the custom toolbar items in the
"This Project" section of the Global (which calls out which macros to run for
the various selections). The code that runs for each selection is located in
a module within Global and, as mentioned below, a needed userform is also in
the Global (although MSP isn't finding it).
- Will
 
J

John

roadkill said:
John
I have the code that creates and deletes the custom toolbar items in the
"This Project" section of the Global (which calls out which macros to run for
the various selections). The code that runs for each selection is located in
a module within Global and, as mentioned below, a needed userform is also in
the Global (although MSP isn't finding it).
- Will

Will,
I guess I'm still not clear on exactly what your code is trying to do,
but here is what I have set up.

I have a couple of custom toolbar buttons set up to facilitate running
various macros during development/test. Some macros may have an
associated userform. The modules containing the initiation code (to call
the userform) and the actual code to implement whatever I want to do are
located in:
ProjectGlobal(Global.MPT)/Modules.
The userform is located in:
ProjectGlobal(Global.MPT)/Forms.
I have nothing in ProjectGlobal(Global.MPT)/Microsoft Project
Objects/ThisProject(Global.MPT). In my case, I manually assign various
macros to the custom buttons but I could also have set up an Open Event
to auto-assign the code to the buttons, although it has been several
years since I did something like that.

Just for reference, you might like to take a look at fellow MVP, Jack
Dahlgren's website at: http://masamiki.com/project/macros.htm
In particular take a look at Jack's information on using Project Events
and Application Events.

John
Project MVP
 

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