Hi ppl,
I need a code to select sheets with pages less than 15 to print out.
Also, a code to print out just the first 5 and last 5 pages if its more than 15 pages.
I've tried this so far but no success:
For X = 1 To Worksheets.Count
If Y Is Nothing Then
Set Y = Sheets(X)
Else
If ExecuteExcel4Macro("Get.Document(50)") < 10 Then
Set Y = Union(Y, Sheets(X))
End If
End If
Next X
Y.Select
I need a code to select sheets with pages less than 15 to print out.
Also, a code to print out just the first 5 and last 5 pages if its more than 15 pages.
I've tried this so far but no success:
For X = 1 To Worksheets.Count
If Y Is Nothing Then
Set Y = Sheets(X)
Else
If ExecuteExcel4Macro("Get.Document(50)") < 10 Then
Set Y = Union(Y, Sheets(X))
End If
End If
Next X
Y.Select