Hi...
Looking for some code to print all worksheets within a workbook and put in
page numbers consecutively. Any help appreciated.
Gordon.
Hi...
Looking for some code to print all worksheets within a workbook and put in
page numbers consecutively. Any help appreciated.
Gordon.
Hello Gordon,
I can give you the code to print the worksheets, but pages number in Excel are a quite another matter as Excel doesn't provide any VBA code to automate accessing, calculating. or manipulating page numbers.
Sub PrintWorksheets()
Dim Wks As Worksheet
For Each Wks In ThisWorkbook.Worksheets
Wks.PrintOut
Next Wks
End Sub
Sincerely,
Leith Ross
Leith Ross wrote
>
> Hello Gordon,
>
> I can give you the code to print the worksheets, but pages number in
> Excel are a quite another matter as Excel doesn't provide any VBA code
> to automate accessing, calculating. or manipulating page numbers.
>
>
> Sub PrintWorksheets()
> Dim Wks As Worksheet
> For Each Wks In ThisWorkbook.Worksheets
> Wks.PrintOut
> Next Wks
> End Sub
>
> Sincerely,
> Leith Ross
>
>
How about this for page#'s?:
Range("A1") = ExecuteExcel4Macro("Get.Document(50)")
--
David
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks