Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing Grouped Sheets
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... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing Grouped Sheets
ActiveSheet.PageSetup.LeftFooter = Range("A1").Value & " Page " & "&P"
"JMay" wrote in message news:6uKnc.16193$nN6.7365@lakeread06... 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... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing Grouped Sheets
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. In article <6uKnc.16193$nN6.7365@lakeread06, "JMay" wrote: 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... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing Grouped Sheets
Thanks Guys,,
I got it going... JMay "JE McGimpsey" wrote in message ... 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. In article <6uKnc.16193$nN6.7365@lakeread06, "JMay" wrote: 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... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
not printing grouped columns | Excel Discussion (Misc queries) | |||
printing worksheet with cells grouped | Excel Discussion (Misc queries) | |||
Printing Footers on Grouped Worksheets | Excel Discussion (Misc queries) | |||
Printing a group that is not grouped | Excel Discussion (Misc queries) | |||
Sheets(array) method for printing grouped worksheets | Excel Programming |