ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PDF basics (https://www.excelbanter.com/excel-programming/415107-pdf-basics.html)

Brad

PDF basics
 
Why does the first macro work but if you combine the first two lines to
shtAssum10.Range("B1:N35").Select - it doesn't?

Sub CreatePDFRates()
shtAssum10.Select
Range("B1:N35").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"\\Spipfile04\dowb1$\2008\annuity\Individual_Illus trator\" &
shtAssum.Range("I39") & ".pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub

Barb Reinhardt

PDF basics
 
You can't select the worksheet and the range on a worksheet at the same time.
It would be nice, wouldn't it?
--
HTH,
Barb Reinhardt



"Brad" wrote:

Why does the first macro work but if you combine the first two lines to
shtAssum10.Range("B1:N35").Select - it doesn't?

Sub CreatePDFRates()
shtAssum10.Select
Range("B1:N35").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"\\Spipfile04\dowb1$\2008\annuity\Individual_Illus trator\" &
shtAssum.Range("I39") & ".pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub



All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com