creating macro that works in any open workbook?

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I can setup and record macros without a problem normally. But I can't figure
out how to setup one that will work no matter what file I have open. I just
need it to copy a few different areas to a known template, but the sheet
being copied will always be a different file. The marco I've setup always
has an error because it looks for the same file that I originally created the
macro to copy from. Can anyone help out on this??? I know it has to be a
simple fix, I'm just over thinking it!!! Thanks for the help in advance......
 
save the file in Excel's startup or alternative startup folders, so that
Excel will open it as soon as you launch Excel
 
Store the macro in your Personal.xls(b) file.

In the macro make sure you use "activeworkbook" and/or "activesheet" not a
hard-coded file/sheet name.


Gord Dibben MS Excel MVP
 
Back
Top