Select All worksheets in a workbook

MrSnow

New Member
Joined
May 6, 2005
Messages
14
Guys,

This is probably a really simple bit of code, and i'm pulling my hair out!!

I want to select every worksheet in a work book (approx 15) so that I can then carry out some standard formatting.

What I need to know is how to select the worksheets in the first place!!

Any suggestions?? All help is greatly appreciated!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thanks Steve,

But what if the size of the workbook increases at somepoint in the future (hypothetically) - the code would then need to be re-written. Is there a way of coding a generic "select all"???

Cheers
 
Upvote 0
Good afternoon MrSnow

Via code? Try this :

Code:
Sub test()
Worksheets.Select
End Sub

HTH

DominicB
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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