#1   Report Post  
Posted to microsoft.public.excel.misc
Gordon
 
Posts: n/a
Default Print workbook

Hi...

Looking for some code to print all worksheets within a workbook and put in
page numbers consecutively. Any help appreciated.

Gordon.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Leith Ross
 
Posts: n/a
Default Print workbook


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
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=513952

  #3   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default Print workbook

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
Reply
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
Print all charts in a workbook (multiple worksheets) aewsaws Charts and Charting in Excel 4 May 12th 23 03:45 AM
Shared workbook losing print settings koppers Excel Discussion (Misc queries) 0 November 11th 05 01:09 AM
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
changing print area in an entire workbook lschuh Excel Worksheet Functions 7 August 4th 05 02:52 PM
Print Spreadsheet tabs in a Workbook to a List? Jugglertwo Excel Discussion (Misc queries) 3 May 28th 05 07:04 PM


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

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

About Us

"It's about Microsoft Excel"