NoS
Member
- Joined
- Jan 17, 2013
- Messages
- 835
- Reaction score
- 0
- Points
- 16
- Location
- British Columbia
- Excel Version(s)
- Excel 2010
Have a workbook I created 11 or 12 years ago with Excel 97.
Users enter data on a daily basis via user form and info goes to a Master sheet.
There is a command button on the user form to print out the Master sheet. Clicking this button brings up another small user form telling the user how many pages the printout will be and yes-no buttons to print or not.
Here's the problem, from day 1 I have used numpages = ExecuteExcel4Macro("Get.Document(50)") to get the printout page count.
It has always given the correct number of pages to be printed. If I run the workbook in Excel 2003 it is correct. The current Master sheet I am working with is 4 pages.
If I run the workbook in Excel 2010 the number of pages indicated is 2 not 4.
If I use numpages = ActiveSheet.HPageBreaks.Count + 1 Excel 2003 still indicates the proper 4 pages will be printed, but Excel 2010 tells me the printout will be 133 pages.
Can any one suggest what I need to do to rectify this issue?
Thanks in advance
NoS
Users enter data on a daily basis via user form and info goes to a Master sheet.
There is a command button on the user form to print out the Master sheet. Clicking this button brings up another small user form telling the user how many pages the printout will be and yes-no buttons to print or not.
Here's the problem, from day 1 I have used numpages = ExecuteExcel4Macro("Get.Document(50)") to get the printout page count.
It has always given the correct number of pages to be printed. If I run the workbook in Excel 2003 it is correct. The current Master sheet I am working with is 4 pages.
If I run the workbook in Excel 2010 the number of pages indicated is 2 not 4.
If I use numpages = ActiveSheet.HPageBreaks.Count + 1 Excel 2003 still indicates the proper 4 pages will be printed, but Excel 2010 tells me the printout will be 133 pages.
Can any one suggest what I need to do to rectify this issue?
Thanks in advance
NoS