Forum Discussion
yugal40
Jan 05, 2022Brass Contributor
Macro should work in only the file it is written in
Hi Folks, I have some macro excel files and i have assigned them shortcuts, But when normal files are opened then those macros work on those files instead of default excel shortcuts. for example C...
Martin_Weiss
Jan 05, 2022Bronze Contributor
Hi yugal40
since all worksheets are usually opened within one single instance of Excel, the defined shortcuts are valid for all open worksheets.
You can probably avoid this if you open your macro file in a separate Excel instance. To do so, press the Alt-Key and hold it when you launch Excel, until you get a window like this:
Now you can release the Alt-Key and click on Yes to start a new instance.
And open all the other files in another Excel instance, not in the same one where the macro file is opened. This way I imagine the shortcuts should work as expected.
- yugal40Jan 05, 2022Brass ContributorThankyou for your reply, Honestly looking for some thing which can normally be used, like many people use those file so every one is not capable of remembering alt key while opening an excel instance.
- Khalil600Jan 07, 2022Copper ContributorI'm very new to macro, I saved my macro as custom templet and instead of using short cut key I select from the list and run desired macro on the sheet I'm working in, not sure if this will help you or not.
- yugal40Jan 07, 2022Brass ContributorIt won't help me as i want to use it as shortcut key
Thanks for the reply