KlausW
Active Member
- Joined
- Sep 9, 2020
- Messages
- 453
- Office Version
- 2016
- Platform
- Windows
Hi everyone
I use this VBA code to save the file in PDF format, it works really well. Now I would like the file to be saved based on the value in cell S9. Some who can help.
Any help will be appreciated.
Best regards Klaus W
I use this VBA code to save the file in PDF format, it works really well. Now I would like the file to be saved based on the value in cell S9. Some who can help.
Any help will be appreciated.
Best regards Klaus W
VBA Code:
Sub Gem_og_Send_Klik()
'Varriables
Dim SaveRng As Range
Dim pdfname As String
Dim path As String
'Setting range to be saved
Set SaveRng = Range("A1:j42")
'path
path = Range("S9").Value2
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("k9").Value _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
'Find_and_Open_Product_Workbook
End Sub