How to Determine How Many Pages Will Be Printed
Article ID: 139405
Article Last Modified on 10/11/2006
APPLIES TO
- Microsoft Excel 97 Standard Edition
- Microsoft Excel 95 Standard Edition
- Microsoft Excel 5.0 Standard Edition
- Microsoft Excel 98 for Macintosh
This article was previously published under Q139405
SUMMARY
Microsoft Visual Basic for Applications does not provide a method to
determine the total number of pages that will print in a worksheet.
However, you can use the ExecuteExcel4Macro method to use the
GET.DOCUMENT(50) macro sheet function to return the total number of pages
that will be printed on the active worksheet.
REFERENCES
Additional information on the Get.Document macro function can be found in
the Excel 4.0 Function reference manual. In Microsoft Excel 5.0, additional
information is contained in the Microsoft Excel 5.0 version of the
MACROFUN.HLP file under Visual Basic Equivalents for Excel Macro Sheet
functions.
Additional query words: 5.00a 5.00c 7.00a XL98 XL97 XL7 XL5 PageSetup PrintPreview Count Pages determining XL
Keywords: kbdtacode kbhowto kbprint kbprogramming KB139405