We have a message box that pops up when we want to print and select whether we want to print to the printer or to Acrobat Distiller. It used to work to print to pdf just fine (provided you had previously selected Distiller selected as the default printer), but within the last week, we started getting the above VB Compile error when we select print to Distiller.
When you click debug after getting this VB error message, the row that it goes right to is the row
Dim MyPDF As PdfDistiller
but when you scroll up, the one with the yellow highlight and the arrow that it bombs out on is the first row here:
Function Print_To_PDF1(MyFrom As Integer, MyTo As Integer, PDF_Print As Boolean, PSFileName As String)
'
'
Dim MyCurrentDir As String
Dim MyPSFileName As String
Dim MyCurrectDir As String, PDFFileName As String
MyCurrentDir = "C:\Temp\Benefit Data Individuals\"
PDFFileName = MyCurrentDir + PSFileName + ".pdf"
MyPSFileName = MyCurrentDir + PSFileName + ".ps"
If Dir(MyCurrentDir + PSFileName + ".ps") <> "" Then
MsgBox "File Already Exist! " + PSFileName + ".ps"
Exit Function
End If
If PDF_Print = True Then 'print to PDF if TRUE
ActiveWindow.SelectedSheets.PrintOut Copies:=1, printtofile:=True, _
collate:=True, prtofilename:=MyPSFileName
End If
'convert postscript file to PDF
Dim MyPDF As PdfDistiller
Set MyPDF = New PdfDistiller
MyPDF.FileToPDF MyPSFileName, PDFFileName, ""
Set MyPDF = Nothing
End Function
When I asked online what might be wrong with the code, I was told
Dim MyPDF As PdfDistiller
PdfDistiller I don't believe is a system-defined type.
As this is the row it first takes you to when you click debug, I am inclined to agree with the person, but I don't know how to "define" it or change the code to make it work. 
Also have no clue why it used to work and now it doesn't. Makes me think that some new VB/Excel changes have come out that is now caused the code to be "defunct?"
I also had a suggestion from someone that said
If you want to keep the code as it is you'll need a reference to the PDFDistiller DLL Library, Tools>References...
Or you could try late-binding using CreateObject to create and reference an instance of Distiller.
But I have no clue how to do either. Again, any help would be greatly appreciated.
Bookmarks