hello:
We have a macro that prints from multiple worksheets in an Excel workbook. The problem is that I am trying to create a PDF file from the worksheets. When this runs, Excel wants to create a separate PDf file for each worksheet. Any suggestions would be helpful.
Thanks.
--Kurt
Example of macro code:
Sub PrintHMOall()
Sheets("HMO"
.Select
cTerritory = Cells(69, 9)
Sheets("HMO"
.Select
Range("A1:J50"
.Select
Selection.PrintOut Copies:=1
Sheets("HMO_R"
.Select
Range("L1:T31"
.Select
Selection.PrintOut Copies:=1
Range("A1:K44"
.Select
Selection.PrintOut Copies:=1
Range("A45:K89"
.Select
Selection.PrintOut Copies:=1
If cTerritory = "E" Then
Range("A90:K133"
.Select
Selection.PrintOut Copies:=1
Range("A134:K178"
.Select
Selection.PrintOut Copies:=1
ElseIf cTerritory = "F" Then
Range("A90:K133"
.Select
Selection.PrintOut Copies:=1
Range("A134:K178"
.Select
Selection.PrintOut Copies:=1
End If
Sheets("HMO"
.Select
Range("A1"
.Select
Range("C2"
.Select
End Sub
We have a macro that prints from multiple worksheets in an Excel workbook. The problem is that I am trying to create a PDF file from the worksheets. When this runs, Excel wants to create a separate PDf file for each worksheet. Any suggestions would be helpful.
Thanks.
--Kurt
Example of macro code:
Sub PrintHMOall()
Sheets("HMO"
cTerritory = Cells(69, 9)
Sheets("HMO"
Range("A1:J50"
Selection.PrintOut Copies:=1
Sheets("HMO_R"
Range("L1:T31"
Selection.PrintOut Copies:=1
Range("A1:K44"
Selection.PrintOut Copies:=1
Range("A45:K89"
Selection.PrintOut Copies:=1
If cTerritory = "E" Then
Range("A90:K133"
Selection.PrintOut Copies:=1
Range("A134:K178"
Selection.PrintOut Copies:=1
ElseIf cTerritory = "F" Then
Range("A90:K133"
Selection.PrintOut Copies:=1
Range("A134:K178"
Selection.PrintOut Copies:=1
End If
Sheets("HMO"
Range("A1"
Range("C2"
End Sub