Hello guys, I using the following code to open a network hyperlink to a pdf file, when the file exist it work perfect, the problem is if the pdf do not exist show error 490. my question is how avoid this error and just show for example a message showing THIS DOCUMENT DO NOT EXIST.
this is the code I am using now:
Private Sub Command22_Click()
Dim FileName As String
Dim Filepath As String
FileName = Me.analysthide & "_Receipt_" & Me.[MonthsCombo] & "_" & Me.[year]
Filepath = "Path to file " & FileName & ".pdf"
Application.FollowHyperlink Filepath
End Sub
thanks