+ Reply to Thread
Results 1 to 3 of 3

Print workbook

  1. #1
    Gordon
    Guest

    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. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    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

  3. #3
    David
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1