franswa3434
Board Regular
- Joined
- Sep 16, 2014
- Messages
- 69
Hey everyone,
I'm trying to create a VBA that will export 2 specific hidden worksheets to a PDF file, but i can't get it to work.
Here is my code:
Private Sub CommandButton1_Click()
Sheet10.Visible = True
Sheet12.Visible = True
Sheets(Array(Sheet10, Sheet12)).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
"C:\Temp\Letter of Intent.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheet10.Visible = False
Sheet12.Visible = False
End Sub
Any and all help would be appreciated.
Thanks!
I'm trying to create a VBA that will export 2 specific hidden worksheets to a PDF file, but i can't get it to work.
Here is my code:
Private Sub CommandButton1_Click()
Sheet10.Visible = True
Sheet12.Visible = True
Sheets(Array(Sheet10, Sheet12)).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
"C:\Temp\Letter of Intent.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheet10.Visible = False
Sheet12.Visible = False
End Sub
Any and all help would be appreciated.
Thanks!