Call Private Macros
Posted by Frank on December 28, 2001 8:52 PM
Hi
I need a way to run a Private Macro on workbook activate and workbook deactivate. I need to make the macros private so that the end user cannot manually run them or delete them. Is there another way to do this besides making them private? When I want to run the macro I have to use the workbook name, but what if the name changes, them the code wont be able to find the macro. I use application.run (activeworkbook.name & "MyMacro") which works fine for the workbook activate, but for the workbook deactivate it returns the new workbook name. How do I get the workbook name before it deactivates. Is there anyway I can get save the workbook name in memory as long as the workbook is open? I cant put the value in a cell since I couldnt refer to it without the workbook name.
Any help would be greatly appreciated.
Thanks
Frank