How is it possible that excel opens in break mode: how do i stop that

spurs

Active Member
Joined
Oct 18, 2006
Messages
479
Office Version
  1. 2016
  2. 2013
  3. 2010
  4. 2007
  5. 2003 or older
Platform
  1. Windows
I created an excel workbook years ago that had some code in the this workbook module. General commands for updating ever entry sort of thing. It also calls a password check macro for verification. This has worked well for years.

The workbook was being used by my associate in China. Recently he sent me a copy back to work on and i cant open it the same way anymore.

As soon as the wordbook module runs on opening excel goes into break mode, and the password check macro doesnt run. The error is "cant execute code n break mode"

I can get into the original macro and see that as soon as i execute the first line:

Private Sub Workbook_Open()

in the workbook module, excel goes into break mode

I am suspicious that someone in China has tampered with the file to cause this; I have no idea where to look to resolve it.

I need the worksheet to run macros to calculate properly and i cant get it to do that atm
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You might also try putting the code into a module instead of a worksheet, if you don't have it that way already.
 
Upvote 0
Press ALT + F11 and look at the Workbook_Open event.
See if there is a line highlighted.
If so, end the macro>>Save>>close and see if it works.
But as @johnnyL as stated, it would help to see the codes
 
Upvote 0
I think i have resolved the issue.
The file is a .xls file
When the file was returned to me from our affiliate in China, i opened it directly without saving it first.
When I opened it i first get a request to enable macros which i accept and then i get the following error before the license check happens during the workbook open event

Run time error 1004
Method OnTime of object application failed

To troubleshoot this I saved the file to my system, and being .xls it warns me of compatibility issues on saving which i accept

After saving and reopening from my own system, the run time error does not occur

I assume its a compatibility issue that is resolved by saving first
 
Upvote 0
Assuming that you are not using a really old version of Excel, I would recommend saving as an "xlsm" or "xlsb", which are the Excel file types that allow VBA (since 2003).

By the way, you should update your Profile to show us which version of Office you are using (like you see with mine).
This is often helpful, if people know which version you are running.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,854
Members
449,051
Latest member
excelquestion515

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