Big problem at work-Runtime 57121

mbb4331

Board Regular
Joined
Dec 22, 2005
Messages
152
I am built a file that worked fine yesterday and I am getting "Application-defined or object-defined error" on anything I try to do this morning. I have two buttons on a sheet called "Control". If I click one to run:

thisworkbook.sheets("data").select

I get this error. All of this code was running fine yesterday. I have the following references:

Excel and Office 11.0 Libraries, Forms 2.0 Library, Visual Basic for Applications and OLE Automation.

I can run "thisworkbook.sheets(1).select", since it refers to the sheet with the button and code, but cannot run "thisworkbook.sheets(2).select"...

One other thing, I may have worked yesterday before saving, and once I saved and tried again today, it didn't.

Any ideas would be very appreciated...
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Thanks, but I deleted the sheet and re-created it and it works.

Somehow, either the sheet or the named range on the sheet became corrupted.
 
Upvote 0

Forum statistics

Threads
1,215,331
Messages
6,124,311
Members
449,152
Latest member
PressEscape

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