hi,please help. how to count the total number of print page display at Sheets("label") range("G8").
for example: total number of print page is 8
page 1 of 8
page 2 of 8
page 3 of 8
"
"
page 8 of 8
please help,thanks.
...全文
833打赏收藏
count total number of print page
hi,please help. how to count the total number of print page display at Sheets("label") range("G8"). for example: total number of print page is 8 page 1 of 8 page 2 of 8 page 3 of 8 " " page 8 of 8 please help,thanks.
current i'm able to count the total page of print.
but the problem now is,if there have 5 page to print the result come out is 1-5,cannot print out
2-5 pages,3-5 pages.
this is the current code:
Sub PageInfo()
Dim iPages As Integer
Dim iCol As Integer
Dim iCols As Integer
Dim lRows As Long
Dim lRow As Long
Dim iPage As Integer
iPages = Worksheets("label").Range("k3")
With ActiveSheet
If .PageSetup.Order = xlDownThenOver Then
iPage = (iCol - 1) * (lRows + 1) + lRow
Else
iPage = (lRow - 1) * (iCols + 1) + iCol
End If
End With