Problem with sheetname in a macro

Bob Ully

Board Regular
Joined
Jun 4, 2013
Messages
66
I have a macro that calls a sheetname. When the macro runs:

Sheets("Macros").Select

the macro stops; I get :

Run-time error '57121':
Application-defined or object-defined error

I checked for leading or lagging spaces in the sheetname. I tried renaming the sheet. I have the exact same code in 2 other sheets and they work fine. My office recently upgraded to a new version of excel, and I was converting older "active-x" buttons to "form-control" buttons.

Any suggestions ??? Thanks for your input .

Bob U.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I can't duplicate that error in any way.
Is that the 'Actual' code, or just an example you typed up?

The only errors I can get are
'Subscript Out Of Range' <-- happens if sheet name is misspelled
Or
'Application-defined or Object-defined error' <-- happens if the sheet is hidden

You might check for Missing References in Tools - References
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,820
Members
449,469
Latest member
Kingwi11y

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