Protected View Issue (Delaying Code execution?)

MPW

Well-known Member
Joined
Oct 7, 2009
Messages
571
Office Version
  1. 365
Platform
  1. Windows
Enable_Err.PNG


Been chasing this rabbit for years.
When my very heavy macro-ed workbook has a name change, Excel will prompt me to "Enable Editing" upon opening the workbook.
I will then get a debug of some variation of this:
debug.PNG


I will then end the routine, close the workbook without saving it. When I reopen it, it will operate correctly until it is renamed again. rinse and repeat.

For some time this would only occur on my pc. Since I have several macros activating when the workbook is opened, I chalked it up to a code execution hold up while I enabled the workbook.
My problem is that since my last code update, this has been effecting other users. As I said, after they initially open and close the workbook, it will run fine from then on.

I understand that I probably caused this problem. My question is if there is some methods of either halting the code until the content is enabled or some method ignore the errors the first time around. and no, I do not want to use "On Error Resume Next".

One last thing, I do not use "Save As" when renaming this workbook. We found that by doing this method it continually increased the size of the workbook. We rename it using Window Explorer.

Thank you for considering this matter. I defer to the wisdom from abroad!
 
I agree that you should not be able to bypass the protected view dialog. My problem arises from the fact that the objects are not loading even after they enable editing. The objects are not loaded until after the workbook object sub is manually stopped in the vba editor.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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