cowski
Mechanical
- Apr 23, 2000
- 8,218
Excel 2000 question:
I have a macro (a custom entry form, all logic is in the one form and a .bas file with one function - show the form) that I would like to assign to a custom button. This is easily done by customizing the button (assign macro...).
The problem comes if I do a "Save As...". Let's say I have file A.xls the button is assigned to ThisWorkbook.Macro1; now I save as and have file B.xls - now the button points to A.xls Macro1 instead of B.xls Macro1 (however, the keyboard shortcut I have set up points to the correct macro). This is a problem since the original file (template) is on my hard drive and want to 'save as' to the network to pass the file off to someone else to enter info. How do I get it to point to the correct macro after a save as?
I did a quick search and found thread770-57692 but it doesn't address my problem.
I have a macro (a custom entry form, all logic is in the one form and a .bas file with one function - show the form) that I would like to assign to a custom button. This is easily done by customizing the button (assign macro...).
The problem comes if I do a "Save As...". Let's say I have file A.xls the button is assigned to ThisWorkbook.Macro1; now I save as and have file B.xls - now the button points to A.xls Macro1 instead of B.xls Macro1 (however, the keyboard shortcut I have set up points to the correct macro). This is a problem since the original file (template) is on my hard drive and want to 'save as' to the network to pass the file off to someone else to enter info. How do I get it to point to the correct macro after a save as?
I did a quick search and found thread770-57692 but it doesn't address my problem.