Copying Excel files and Macro problems

G

Guest

Whenever I copy an Excel file and later try to use the Macro's. They always
point back to the original file and I get an error about opening the same
file twice. Is there a way to program an update to the macros on the new
file or to save the file without referrencing the original macro's file?

Thanks,

Jesse
 
B

Bill Renaud

If you are using macros across several workbooks, then it might be time to
consider putting the macros in an add-in.

Or, until your code is fully debugged, put all of the macros into a blank
workbook with a name similar to the main macro. Make sure that any toolbar
or custom menu used to call (start execution of) the macros is attached to
the new workbook, hide the workbook window, then save the workbook from the
VBE (Visual Basic Editor). Delete the custom toolbar from the Excel toolbars
area before re-opening the workbook with the macros in it, otherwise the
existing toolbar buttons will still point to the original workbook with data
and macros in it.

You may have some editing work to do to make sure that your macros still
reference the correct workbook when running.

(Just a quick suggestion, without knowing more details.)
 
Top