Excel Workbook with Macros Running and another new Excel workbook opens causes error message

nmk34

New Member
Joined
Apr 12, 2022
Messages
45
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have this workbook with macros running and programmed to minimize or password to close the workbook .This workbook collects data 24 hours with breaks between shifts. if someone minimized it then started a new workbook, Excel popup indicating that this "macro1" not a variable on this new workbook and closes the original workbook with macros. the second new workbook and the popup can not be close except thru Task Manager. is there a work around and maybe limit excel to one instance?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I suspect your code uses things like ActiveWorkbook and ActiveSheet - so when it runs the other book/sheet is the active object. That's the risk of using active object references. If not the case I don't know, otherwise perhaps see this for the differences

 
Upvote 0
thank you for your response. the data collection software was trying to write to any open excel workbook. i changed the settings to restrict the software to write only a specific workbook and that resolved the problem and no more error. as far as the new Excel instance prevention, i change the excel options under advance, then General to ignore other DDE programs.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,596
Messages
6,179,807
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top