I have created a macro that does some processing on a main worksheet and puts the results on a different worksheet in the same workbook. This macro is activated by a custom menu bar entry I created (Excel 2003) using the Customize functionality.
At the end of the macro, I issue a command to save the entire workbook. I then activate the results worksheet and issue a SaveAs command in the macro to prompt for the location and name of the CSV file to be exported.
This all works great.
The problem occurs when I open the original workbook (not the one created in the SaveAs). When I go to run the macro again from the menu bar, I get a message telling me the macro can't be found. When I look at the set up of the menu bar entry it now shows the name of the macro with the filename and path to the CSV file appended to the beginning (e.g. "c:\grnt0809.csv!macro3" instead of "macro3").
What's up and how do I stop this from happening?
Thanks in advance.
At the end of the macro, I issue a command to save the entire workbook. I then activate the results worksheet and issue a SaveAs command in the macro to prompt for the location and name of the CSV file to be exported.
This all works great.
The problem occurs when I open the original workbook (not the one created in the SaveAs). When I go to run the macro again from the menu bar, I get a message telling me the macro can't be found. When I look at the set up of the menu bar entry it now shows the name of the macro with the filename and path to the CSV file appended to the beginning (e.g. "c:\grnt0809.csv!macro3" instead of "macro3").
What's up and how do I stop this from happening?
Thanks in advance.