View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
[email protected] nomail1983@hotmail.com is offline
external usenet poster
 
Posts: 58
Default Is it possible to make an excel macro to work with all sheets?

On Aug 15, 1:48 pm, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
You can do the
same thing EXACTLY except just save the workbook (personal.xls or named
Mymacros.xls as I show below, doesn't matter) in your regular folder. It
will work pretty much the same except that you don't get the automatic
loading of the file that you would if it were in the XLSTART folder.


I am so glad I found this gem with a Google search. Even though it
might seem obvious to you, it was not obvious to me until you
mentioned it. I like this approach much better than setting up
personal.xls. It allows me to adapt macros to new repetitive
situations without having to worry about maintaining backward
compatibility.

Thank you very much for taking the time to explain this step by step.
It turned my tedious error-prone task into a breeze.


----- complete original posting -----

On Aug 15, 1:48 pm, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
OK, you can't create a file to place into the XLSTART folder. You can do the
same thing EXACTLY except just save the workbook (personal.xls or named
Mymacros.xls as I show below, doesn't matter) in your regular folder. It
will work pretty much the same except that you don't get the automatic
loading of the file that you would if it were in the XLSTART folder.

#1) really easy: save a workbook with nothing but that macro (and any others
you might like to keep handy) in your regular My Documents folder. Anytime
you need them, just open that file along with the other files you're working
with. Lets say you call it MyMacros.xls (but personal.xls would be fine
also). You open another workbook, HardWork.xls. With it open, in the same
instance of Excel use File | Open to open up MyMacros.xls. Choose the
HardWork.xls file again and work in it as usual. When you need a macro from
your MyMacros.xls file, just use Tools | Macro | Macros (from the other book,
like the HardWork.xls file) and identify the one you need. The ones in
MyMacros.xls will be listed using both the workbook name and the macro name.