Carl Stephens
New Member
- Joined
- Jan 3, 2017
- Messages
- 35
- Office Version
- 365
Hello All,
I have the below code that prints to pdf and gives the file name based on cell N1, and in cell N2 I have the file path location of where I want the file to save, but for the life of me cannot get the code right, and I am hoping that someone can kindly enlighten me on what the code should look like. Thank you all.
Sub PrintVisa()
s = Range("N1").Value
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
s, Quality:=xlQualityStandard, IncludeDocProperties _
:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
MsgBox "Success - Ensure that you close the PDF file before printing another document."
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
I have the below code that prints to pdf and gives the file name based on cell N1, and in cell N2 I have the file path location of where I want the file to save, but for the life of me cannot get the code right, and I am hoping that someone can kindly enlighten me on what the code should look like. Thank you all.
Sub PrintVisa()
s = Range("N1").Value
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
s, Quality:=xlQualityStandard, IncludeDocProperties _
:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
MsgBox "Success - Ensure that you close the PDF file before printing another document."
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub