Consulting

Results 1 to 6 of 6

Thread: Solved: Number of Print Pages

  1. #1
    VBAX Regular
    Joined
    Nov 2005
    Posts
    39
    Location

    Solved: Number of Print Pages

    Hopefully this is an easy one....

    I am setting up a script that creates a report and then gives the user the option to print it. However, I wan't to check the number of pages before it is sent to the printer. This way I can alert the user that the report will be over XX Number of pages.

    Obviously, if the report is small it will just print. But depending on the data requested the report can range from 2 pages to over 50 pages.

    Is there a property that will show the number of pages the report will print on before sending it to the printer?

    Thanks!

  2. #2
    VBAX Regular
    Joined
    Aug 2006
    Posts
    55
    Location
    Last edited by Pinokkio; 08-22-2006 at 10:43 AM.

  3. #3
    VBAX Regular
    Joined
    Aug 2006
    Posts
    55
    Location
    Hi GMan,


    try this line in a sub:

    MsgBox ExecuteExcel4Macro("Get.Document(50)")

    Greetings
    P.

  4. #4
    VBAX Regular
    Joined
    Nov 2005
    Posts
    39
    Location
    Thanks Pinokkio!!! this is exactly what I was looking for.

  5. #5
    VBAX Regular
    Joined
    Aug 2006
    Posts
    55
    Location
    gladly that I could help
    P.

  6. #6
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Pinokkio,
    Welcome to VBAX.
    Great to someone start straight off with an answer.
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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