Preventing workbooks from opening into same Excel
Hey you all,
Lets say you have a worksheet running a macro loaded into one instance of Excel. While this is going on, you don't want any other workbook to open into the same instance of Excel. Can anybody give me a hint on how i could prevent this from happening by using VBA?
Any thought would be greatly appreciated.
Volker
Re: Preventing workbooks from opening into same Excel
Hey David,
I did used your code to restrict opening new excel workbook and allow to run the existing workbook. But it didn't worked in my case after inserting the code I saved the file as macro enabled file and reopened the file and as i type Ctrl N the new excel workbook opens..
Plz guide where do i am running wrong...
Re: Preventing workbooks from opening into same Excel
as this is 15 years and multiple versions of excel later, anything could have changed
opening an existing workbook is different from adding a new workbook
adding a new workbook does not fire the workbook_open event, so the code will not work in that case, you should either disable the menu items, which should also disable the shortcut keys, or have code in the workbook_new event