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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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,967
Messages
6,122,503
Members
449,090
Latest member
RandomExceller01

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