Hi.
I've written the below code, but the PDF is not saving in the below path and is saving the PDF into a different path. I can't see where it saves it to because the save box only appears for a sec. Can't see what I'm doing wrong. I'm simply saving the active sheet as a PDF. I've selected a particular range within the worksheet as a set printed area. Any ideas?
Sub Save_PDF() Dim invno As Long Dim custname As String Dim Amt As Currency Dim dt_issue As Date Dim Path As String Dim fname As String Dim Nextrec As Range Dim dt_bill As Date invno = Range("c20") custname = Range("c1") Amt = Range("n48") dt_issue = Range("d20") dt_bill = Range("n20") Path = "Q:\Finance\Accounts\Finance\" fname = dt_bill & " " & custname & " " & invno ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF End Sub




Reply With Quote