How do I make a 'global' macro?

  • Thread starter Thread starter Colin Higbie
  • Start date Start date
C

Colin Higbie

I'm sorry if this is a stupid question. I know how to move code from one
workbook to another, but I don't know how to move it to the global template
so it's always available for every workbook.

How can I do that? I looked in the help and couldn't find it. Maybe I didn't
know what to search under...

Thanks for any help,
Colin
 
Macros available "full-time" reside in your "Personal.xls" file to be found
in your XLstart
folder. Open Excel at the menu, select WIndows Unhide {Select personal}
and OK
Alt-F11 to get to the VBE and put your macro code in a standard module.
Save, Close
VBE Window; then Windows Hide Personal. Close Personal - answer Yes to save.
Quit Excel, then reopen Excel - your macro should be available.
 
I believe you could put it in any workbook -- i.e. the name doesn't have to be
Personal.xls -- as long as it is in the XLSTART directory so it loads
automatically, and you either set a reference to it from the VB editor, or you
use the workbook name with the function name.
 
There was no Personal.xls file in the XLStart folder. I created it, now it
opens as a workbook every time I start Excel. It did successfully globally
enable the macro, as you said.

How do I get the macro without the rest of the workbook?

Thanks,
Colin
 
Colin

Select Personal.xls from Window and "Hide".

Close Excel and when asked click "yes" to "do you wnat to save changes etc."

Peronal.xls will now open "hidden" when you start Excel.

Gord Dibben Excel 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

Back
Top