Group All Sheets in a workbook

M

Michael Smith

Anyone know the code to group all Sheets in a workbook??...trying to do
the same page setup on all sheets in a workbook and need to group them
together first.

TIA.
-mike


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
P

PaulD

: Anyone know the code to group all Sheets in a workbook??...trying to do
: the same page setup on all sheets in a workbook and need to group them
: together first.
:
: TIA.
: -mike

Well, not sure exactly what you mean but there are several ways to select
worksheets.

You can use the sheets collection
Sheets.Select
to select all sheets

or you can iterate throught the collection
for each sh in sheets
...code here
next sh

you could array the sheets
Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4")).Select

I believe .pagesetup is a propert of worksheet only so you either need to
group them first then use activesheet or iterate
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top