View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Standardizing Page Set Up for Muliple Sheets

Some things work with grouped sheets when you do them manually. Some things
don't.

But you can always loop through your sheets:

Option Explicit
Sub PageSetup()
Dim wks As Worksheet

For Each wks In Worksheets(Array("NEW CONFIRM", "NEW GESV", "NEW GESA"))
With wks
.Rows(1).Insert
.Range("a1").Value = "Match/No Match"
.Range("B1").Value = "Original Table"
.Range("C1").Value = "CNO"
.Range("D1").Value = "Name"
End With
Next wks

End Sub



JOUIOUI wrote:

I want the same header, footer and column headings on about 8 sheets, but I
can't seem to get it to work. If I list just one page in the string it does,
but if I list all the sheets, it does not. Here is just a section of my code.
What am I doing wrong. Thanks for your help.

Sub PageSetup()

Sheets("NEW CONFIRM", "NEW GESV", "NEW GESA").Select

Rows("1:1").Select
Selection.Insert Shift:=xlDown

Range("A1").Select
ActiveCell.FormulaR1C1 = "Match/No Match"

Range("B1").Select
ActiveCell.FormulaR1C1 = "Original Table"

Range("C1").Select
ActiveCell.FormulaR1C1 = "CNO"

Range("D1").Select
ActiveCell.FormulaR1C1 = "Name"


--

Dave Peterson