LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default What's the VBA syntax to replicate this?

When a user wants to make a global update to the print setup in a
multi-tab workbook, they can group all the sheets, make the change, and
it reflects in each of the grouped tabs. I'm trying to replicate this
using VBA, but I can't make it work.

I've tried
ActiveWorkbook.Sheets.Select
Sheets("Home").Activate 'tried it with and without this line
With ActiveSheet.PageSetup
.setup parameters snipped
End With
.... but this changes only the first of the grouped tabs.

I've written code that changes each tab's setup individually, but that
takes 80 to 90 seconds to run.

In desperation I recorded the steps in a macro, which derives this code
to group tabs:
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
Since the number and names of tabs will vary from user to user, I wrote
code to recreate the list of tab names with quotes, commas, and spaces
then using the variable name in that syntax, like this
Sheets(Array(TabNamesList)).Select
.... to no avail- it generates an error.

What is the syntax to replicate the process of manually grouping tabs?
Thanks!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for using "IF"... garry05 Excel Discussion (Misc queries) 4 December 7th 05 10:15 PM
Insert more than 1 Row Syntax blazzae Excel Worksheet Functions 5 July 10th 05 12:46 AM
Rate syntax KWIGZ Excel Discussion (Misc queries) 2 June 16th 05 07:59 PM
WHAT SYNTAX IS USED TO ROUND A 4-DIGIT NUMBER TO THE NEAREST THOUS KENITOSAN Excel Discussion (Misc queries) 4 February 19th 05 10:06 PM
Previous Post - Correct Syntax Query Clarence Crow Excel Worksheet Functions 0 December 7th 04 05:35 AM


All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"