![]() |
Application.OnKey Macro Cannot be found
Have an .xla add-in that is opened but not loaded (not ticked under Tools,
Add-ins). In the Workbook_Open event I run a Sub to create a menu and this Sub sets some keyboard shortcuts like this: Application.OnKey "^+v", "Macro1" Macro1 is in a normal code module. When I do the keyboard shortcut I get the exact message: The macro "C:\ExcelAddins\Reporting.xla'!Macro1' cannot be found. I also tried to fully set the macro like this: Application.OnKey "^+v", "Reporting.xla!Module1.Macro1" But same result. The file is present in the folder, the .xla file is open,the macro is present in a normal module, so what causes the above message? I had this working fine before and no idea why it is not now. Thanks for any advice. RBS |
Application.OnKey Macro Cannot be found
No progress with this yet, but now had one occasion where I got this same
error message (but for a different procedure) where there was no keyboard shortcut involved at all. It happened when a Sub was called by another Sub. Couldn't reproduce it after. Have run Detect and Repair in case that would do any good, but made no difference on the OnKey procedure. Any insight/advice in this greatly appreciated. RBS "RB Smissaert" wrote in message ... Have an .xla add-in that is opened but not loaded (not ticked under Tools, Add-ins). In the Workbook_Open event I run a Sub to create a menu and this Sub sets some keyboard shortcuts like this: Application.OnKey "^+v", "Macro1" Macro1 is in a normal code module. When I do the keyboard shortcut I get the exact message: The macro "C:\ExcelAddins\Reporting.xla'!Macro1' cannot be found. I also tried to fully set the macro like this: Application.OnKey "^+v", "Reporting.xla!Module1.Macro1" But same result. The file is present in the folder, the .xla file is open,the macro is present in a normal module, so what causes the above message? I had this working fine before and no idea why it is not now. Thanks for any advice. RBS |
Application.OnKey Macro Cannot be found
Where are these keyboard shortcuts stored?
Is it in the registry or the .olb file? I have renamed the .olb file, but it made no difference. RBS "RB Smissaert" wrote in message ... Have an .xla add-in that is opened but not loaded (not ticked under Tools, Add-ins). In the Workbook_Open event I run a Sub to create a menu and this Sub sets some keyboard shortcuts like this: Application.OnKey "^+v", "Macro1" Macro1 is in a normal code module. When I do the keyboard shortcut I get the exact message: The macro "C:\ExcelAddins\Reporting.xla'!Macro1' cannot be found. I also tried to fully set the macro like this: Application.OnKey "^+v", "Reporting.xla!Module1.Macro1" But same result. The file is present in the folder, the .xla file is open,the macro is present in a normal module, so what causes the above message? I had this working fine before and no idea why it is not now. Thanks for any advice. RBS |
Application.OnKey Macro Cannot be found
Finally solved this problem.
It had to do with the fact that another open workbook had a Sub with the same name. Not sure how this could cause trouble as the workbook was specified with the OnKey. Also didn't come across this possibility in my searches, but pleased this is solved. RBS "RB Smissaert" wrote in message ... Have an .xla add-in that is opened but not loaded (not ticked under Tools, Add-ins). In the Workbook_Open event I run a Sub to create a menu and this Sub sets some keyboard shortcuts like this: Application.OnKey "^+v", "Macro1" Macro1 is in a normal code module. When I do the keyboard shortcut I get the exact message: The macro "C:\ExcelAddins\Reporting.xla'!Macro1' cannot be found. I also tried to fully set the macro like this: Application.OnKey "^+v", "Reporting.xla!Module1.Macro1" But same result. The file is present in the folder, the .xla file is open,the macro is present in a normal module, so what causes the above message? I had this working fine before and no idea why it is not now. Thanks for any advice. RBS |
All times are GMT +1. The time now is 02:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com