Printing Grouped Sheets

J

JMay

I have 3 Worksheets which I have "Grouped"
WS01 - has 3 pages of printable stuff
WS02 - has 2 pages of ... stuff
Ws03 - has 1 page

Private Sub Workbook_BeforePrint(Cancel As Boolean)
CellInFooter
End Sub

Public Sub CellInFooter()
ActiveSheet.PageSetup.LeftFooter = Range("A1").Value & Page#
End Sub

Problem? >>> Page# << Not working; Wish for it to print from 1
sequentially to end (page 6). Any help appreciated...
 
J

JE McGimpsey

One way:


Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSheet As Worksheet
For Each wsSheet In ActiveWindow.SelectedSheets
wsSheet.PageSetup.LeftFooter = _
wsSheet.Range("A1") & " &P"
Next wsSheet
End Sub

See "Formatting Codes for Headers and Footers" in XL/VBA Help for more
codes.
 
J

JMay

Thanks Guys,,
I got it going...
JMay

JE McGimpsey said:
One way:


Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSheet As Worksheet
For Each wsSheet In ActiveWindow.SelectedSheets
wsSheet.PageSetup.LeftFooter = _
wsSheet.Range("A1") & " &P"
Next wsSheet
End Sub

See "Formatting Codes for Headers and Footers" in XL/VBA Help for more
codes.
 
Top