Hi all,
I've got the below code which works very well, however, I'd like it to automatically run when the workbook is opened.
What do I need to do?
Thanks in advance
I've got the below code which works very well, however, I'd like it to automatically run when the workbook is opened.
What do I need to do?
VBA Code:
Sub SaveAsPDF()
Dim fName As String
With ActiveSheet
fName = .Range("A1")
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\USERNAME\Desktop\" & fName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End With
End Sub
Thanks in advance