For those just joining:
This is a two-stage process that works for me. Might be slightly cumbersome, might even have a few steps that aren't actually needed (but I've only done this stuff a couple of times -- it's not that common a task) but it works for me.
Also ... one of the environments I work in (the one I'm in right now, actually) has locked down Global.MPT so that it cannot be updated. Because of that, I have to "fiddle" loading Global.mpt (see the end of this message).
Stage 1
1. Create macros, forms, buttons, etc.
2. Tools | Organizer... and manually copy the items you created from your project into Global.MPT
3. Exit from project
This should have moved all of your customizations from the active project into Global.MPT. You can confirm this by
4. Start | Programs | Project to load an empty project
5. Tools | Organizer and then, at the bottom of the popup make certain that one of the two windows shows GLOBAL.MPT. If it isn't showing then click on the downward pointing triangle on either side and select GLOBAL.MPT.
6. In turn, click on the various tabs Calendars, Toolbars ... etc., and monitor the contents in the scroll box on the popup. If you're missing something then you goofed up above in step 1 (when you created them) or step 2 (when you copied them into Global.MPT).
In theory (and, I think, in practice) opening any project from now on should show those items (they are, after all, in Global.MPT).
If they still don't appear, you have two choices:
7. Manaully copy them from Global.MPT to your project (The reverse of step 2 above: Tools | Organizer ... select them in GLOBAL.MPT and copy them to your project);
8. OR write some code to do this.
8a. Alt+F11 to open the VBA editor
8b. In the left panel, look for the bold item VBAxxxxxxx (where xxxxxxx is replaced by your project file name)
8c. Double-click on the Microsoft Project Objects folder to open it
8d. Double-click on ThisProject
8e. In the upperright panel, set the first dropdown to Project and set the second dropdown to Open
8f. Add the following code
Dim strPrjName As String
strPrjName = MSProject.ActiveProject.Name & ".MPP"
Then add variations on the theme of:
OrganizerDeleteItem Type:=pjModules, FileName:=strPrjName, Name:="Module2"
OrganizerMoveItem Type:=pjModules, FileName:="GLOBAL.MPT", ToFileName:=strPrjName, Name:="Module2"
Depending on what you are deleting and copying you'll need these constants
pjModules, pjViews, pjTables, pjFilters, pjToolbars
and you'll need to make sure that you are deleting and copying the appropriate pairs of Constants (pjModules) and module names (in this case it was called "Module2").
That should pretty much solve your problem.