Help please. Since switching from 2010 to 2019 the command button to open a pdf returns "compile error: cant find project or library"
A txtbox is populated from a column after double clicking a component listed in the output box.
Click the cmdPDF button, in 2010, opened up the PDF. 2019 returns the above error.
I have copied and pasted both PDF_Dir and READERPath to an Explorer search bar and they lead to where they should.
I have not ruled out the possibility that the office upgrade coincided with a coding mistake some how.
Tried using XL2BB but Mini Sheet is ghosted out. Hope this is ok.
A txtbox is populated from a column after double clicking a component listed in the output box.
Click the cmdPDF button, in 2010, opened up the PDF. 2019 returns the above error.
I have copied and pasted both PDF_Dir and READERPath to an Explorer search bar and they lead to where they should.
I have not ruled out the possibility that the office upgrade coincided with a coding mistake some how.
Tried using XL2BB but Mini Sheet is ghosted out. Hope this is ok.
VBA Code:
Private Sub cmdPDF_Click()
Dim PDFDir As String, FName As String, PDFFile As String
Dim READERPath As String
FName = txtPDF
If (txtPDF.Value) = "" Then
MsgBox " Nothing to Open", vbCritical, "Error"
Cancel = True
Exit Sub
End If
PDF_Dir = "C:\Users\Dave\Desktop\Components_WIP\Components_PDFs\"
PDFFile = PDF_Dir & FName & ".pdf"
READERPath = "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe"
Shell READERPath & " " & PDFFile, vbNormalFocus
End Sub