I'm running a macro on Excel 2003 and assigned it to a toolbar button via the standard "Assign Macro" form.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
This macro, in order to save the results of all the processing and not affect the original workbook, performs a SaveAs to another Excel file upon completion before closing the active excel workbook (with save=false). This works great except that the next time I open the original workbook and try to run the macro again from the toolbar button, it has been reassigned to the previous SaveAs workbook. In order to use the original workbook's macro, I have to reassign the macro back to the current active Workbook which defeats the whole idea of having a toolbar button. OR worse, if the SaveAs file has been moved, it produces a "can't find the file" error and I have to reassign anyway. It's not a problem if I were the only one using this workbook/macro but it will be an analysis tool for several engineers and any extra actions requires extra time to perform, adding extra procedure steps and training, etc., especially if it's not intuitively obvious that the macro has been reassigned rather than being left alone.
<o> </o>
Obviously I've tried to assign to just this workbook and also by name but to no avail rather than all workbooks but same results occur.
<o> </o>
How do I get excel to not assign the macro to the SaveAs workbook in the first place, leaving it assigned to the original workbook as one would expect following a close with no save?
<o> </o>
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
This macro, in order to save the results of all the processing and not affect the original workbook, performs a SaveAs to another Excel file upon completion before closing the active excel workbook (with save=false). This works great except that the next time I open the original workbook and try to run the macro again from the toolbar button, it has been reassigned to the previous SaveAs workbook. In order to use the original workbook's macro, I have to reassign the macro back to the current active Workbook which defeats the whole idea of having a toolbar button. OR worse, if the SaveAs file has been moved, it produces a "can't find the file" error and I have to reassign anyway. It's not a problem if I were the only one using this workbook/macro but it will be an analysis tool for several engineers and any extra actions requires extra time to perform, adding extra procedure steps and training, etc., especially if it's not intuitively obvious that the macro has been reassigned rather than being left alone.
<o> </o>
Obviously I've tried to assign to just this workbook and also by name but to no avail rather than all workbooks but same results occur.
<o> </o>
How do I get excel to not assign the macro to the SaveAs workbook in the first place, leaving it assigned to the original workbook as one would expect following a close with no save?
<o> </o>