Bizarre Problem

MrExcel

.
Builders Club Member
Joined
Feb 8, 2002
Messages
3,392
Office Version
  1. 365
Platform
  1. Windows
This is a bizarre problem. I have an application that was originally written with dialog sheets and old style controls. We've replaced just about everything.

Now, occassionally, when I open the file, I get this:
Run time error 57121
Application-Defined or object-defined error.

I click Debug, it is a line of code that is trying to Select Sheet 1. Here is the really bizarre part....

In the debug window, the entire Project Explorer window is greyed out. It is as if Excel hasn't finished opening the file yet, so it doesn't realize that Sheet1 exists.

Further complication - I get this error on my VB6 development machine, but not the vanilla Excel machine.

Any thoughts, ideas, anything would be appreciated.

Bill
 
Note that I was getting this same error (Run-time error 57121) as well. I finally determined that it was due to a BAD ActiveX control on one of my worksheets - this was the standard button command control that is included with Excel 2010. In the VB Editor on the worksheet with the bad ActiveX, there were at least 50 other controls listed in the dropdown box - not sure how they got there as I only was using and could see 2 command buttons on the worksheet. And of course the other ~48 were no where to be found on the sheet. Back on the sheet, 1 of the controls had valid properties and the other control had a blank property page. I tried deleting the ActiveX control and the program would crash. I tried deleting the worksheet and the program would crash.
After hours of work, the fix, was to disable ALL ActiveX controls from the Options page under the Trust Center tab. Then exit the Excel file, reopen it and then and only then did it allow me to delete the control and ultimately the worksheet.

I hope this helps others with the bug issue, I can only believe that the file/ActiveX got corrupted from Excel crashes during development.

I had to take the time and post a solution on this great website as it has helped me out greatly over the years.
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,215,373
Messages
6,124,546
Members
449,169
Latest member
mm424

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