EXCEL 2007 - Create PDF
Hello,
I have Excel 2007, get an error when running the following code to create PFD. I can save the exact code and run it on Office360 no problem.
I'm interested to know if it's my '07' version or does my machine require an Add-in to run it?
Also, apologies regarding my post description, I posted accidentally before completing.
'-------------------------------------------------
Sub CreatePDF()
Worksheets("SCHEDULES").Activate
Dim dte As String
Dim Adr As String
Dim IDw As String
Dim path As String
Dim fname As String
dte = Range("H3").Text
Adr = Range("G2").Text
IDw = Format(dte, "medium Date")
path = "C:\Users\.....\....."
fname = Adr & ", " & IDw & ".pdf"
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=path & fname, _
IgnorePrintAreas:=False ' ,_
' OpenAfterPublish:=False
End Sub
'-----------------------------------------------
Last edited by psyclone; 01-02-2023 at 06:04 PM.
Reason: Posted accidentally before completion
|