Hi,
i have a button on my spreadsheet to save the sheet as a PDF but i can figure out how to get it to create a copy of the file in excel with the same name and save both that copy and the PDF in the location of where the file original file is saved
this is my code currently:
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=Range("P2"), _
OpenAfterPublish:=True
Application.ScreenUpdating = True
End Sub
i have a button on my spreadsheet to save the sheet as a PDF but i can figure out how to get it to create a copy of the file in excel with the same name and save both that copy and the PDF in the location of where the file original file is saved
this is my code currently:
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=Range("P2"), _
OpenAfterPublish:=True
Application.ScreenUpdating = True
End Sub