Sheet numbers enigma

normpam

Active Member
Joined
Oct 30, 2002
Messages
355
Have a workbook with multiple sheets. The third sheet is named 'Draw'. When I use Sheets(1).Select it work fine. Also works with sheets 5,6,7 etc. BUT, it will not work to go to the third sheet named 'Draw'. Here's where it gets more crazy. If I copy the Draw sheet to a new workbook, even it is the third sheet the code still works. But in the workbook I need to use, the coder simply will not go to the third sheet named Draw. Also, if I move this third sheet to another position, it will not work either - how is this possible? I do note that there are many hidden sheets, but that does not seem to be the issue, as I have tested it by moving and adding and hiding sheets.....
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
When asking for help with some code you have written it's always best to show us your code.
Normally I would use:
VBA Code:
Sub Sheet_Select()
'Modified 6/28/2020 1:55:04 AM  EST
Sheets("Draw").Activate
End Sub
 
Upvote 0
Apart from showing code as suggested by MAIT, it is also best to describe what does actually happen, rather than just "it will not work to go to the third sheet".

Does your workbook have any hidden sheets?
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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