Scannerman
01-13-2005, 11:11 AM
I've written a Macro that imports data from a .CSV file, formats it and saves the result to a new comma separated .txt file. I would like to start the macro from a button on standard toolbar so I've added my button and assigned my macro to it. Fine so far, it works correctly the first time I use the button.
Trouble is every time I save my new .csv file my toolbar button gets re-assigned to a macro in the new file. Of course because it is a .txt file there's no macro there. The next time I open the original spreadsb=heet and try to run the macro from the toolbar button I get an error. It works fine from the keyboard shortcut I've set up though.
How can I assign my toolbar button to a fixed named .xls file and macro, so that it doesn't get re-assigned every time?
I could attach my code but I don't think that has anything to do with the problem. I think its a problem with the custom toolbar button.
Hope somebody can help.
Trouble is every time I save my new .csv file my toolbar button gets re-assigned to a macro in the new file. Of course because it is a .txt file there's no macro there. The next time I open the original spreadsb=heet and try to run the macro from the toolbar button I get an error. It works fine from the keyboard shortcut I've set up though.
How can I assign my toolbar button to a fixed named .xls file and macro, so that it doesn't get re-assigned every time?
I could attach my code but I don't think that has anything to do with the problem. I think its a problem with the custom toolbar button.
Hope somebody can help.