I am no VBA expert but I was looking for that last week and found it. I assign a folder where to save it ("Path") and my filename is in Sheets("Sheet1").Range("B1").Value inside my workbook.
The way it works is that it first saves it as a Postscript file (if you change the extension of your unsuable PDF for PS, it should open it), then converts the PS into a PDF and kills the PS. It also deletes the .log that Distiller creates when converting PS into PDF. Make sure you have the proper extensions checked ad you know where is your PDFPrinter (mine is on Ne01).
bozzo
Private Sub Create_PDF_Click()
Dim Path As String
Dim Acro As New ACRODISTXLib.PdfDistiller
Dim KPathPs As String
Dim Logpath As String
Path = "C:\folder_to_save_PDF\"
Application.ActivePrinter = "Adobe PDF on Ne01:"
ActiveSheet.PrintOut _
Copies:=1, _
Collate:=True, PrToFileName:=Path & Sheets("Sheet1").Range("B1").Value & ".ps"
Set Acro = New ACRODISTXLib.PdfDistiller
Acro.bShowWindow = False
'create pdf
Acro.FileToPDF Path & Sheets("Sheet1").Range("B1").Value & ".ps", Path & Sheets("Sheet1").Range("B1").Value & ".pdf", ""
KPathPs = Path & Sheets("Sheet1").Range("B1").Value & ".ps"
Logpath = Path & Sheets("Sheet1").Range("B1").Value & ".log"
'remove ps file
Kill KPathPs
Kill Logpath
Set Acro = Nothing
End Sub