L
LSDean
The application.followhyperlink yields the Run timer Error 16388 which
is caused by either security settings or anti-virus software.
Selecting OK makes message vanish and the hyperlink executes properly.
The clicking OK is annoying.
Found numerous posts by Dirk and Dev to use API calls. I implemented
the code, but now I get a different run time error:
Run time error 438
Object doesn't support this property or method.
The hyperlink leads to a TIF. Below is the code. I'm showing example
of each approach.
Any suggestions on how to avoid these errors?
' = = = = = = = =
Private Sub cmdHyperFront_Click()
Dim xfile As String
' xserver is \\server1\folder1\subfolder1\
' xserver ends with backslash
xfile = xserver & Trim([box]) & _
"\lowres\" & Trim([Negative]) & "\" & _
Trim([Negative]) & "r.tif"
If IsFile(xfile) = True Then
'Application.FollowHyperlink xfile
Print fHandleFile(xfile, WIN_NORMAL)
' fhandlefile cause Run time error 438
Else
xfile = xserver & _
Trim([Negative]) & "\" & _
Trim([Negative]) & "r.tif"
If IsFile(xfile) = True Then
Application.FollowHyperlink xfile
' application.followhyperlink causes
' run time error 16388
'Print fHandleFile(xfile, WIN_NORMAL)
Else
MsgBox "Image does not exist.", vbOKOnly
End If
End If
End Sub
' = = = = = =
Thank you,
LSDean
is caused by either security settings or anti-virus software.
Selecting OK makes message vanish and the hyperlink executes properly.
The clicking OK is annoying.
Found numerous posts by Dirk and Dev to use API calls. I implemented
the code, but now I get a different run time error:
Run time error 438
Object doesn't support this property or method.
The hyperlink leads to a TIF. Below is the code. I'm showing example
of each approach.
Any suggestions on how to avoid these errors?
' = = = = = = = =
Private Sub cmdHyperFront_Click()
Dim xfile As String
' xserver is \\server1\folder1\subfolder1\
' xserver ends with backslash
xfile = xserver & Trim([box]) & _
"\lowres\" & Trim([Negative]) & "\" & _
Trim([Negative]) & "r.tif"
If IsFile(xfile) = True Then
'Application.FollowHyperlink xfile
Print fHandleFile(xfile, WIN_NORMAL)
' fhandlefile cause Run time error 438
Else
xfile = xserver & _
Trim([Negative]) & "\" & _
Trim([Negative]) & "r.tif"
If IsFile(xfile) = True Then
Application.FollowHyperlink xfile
' application.followhyperlink causes
' run time error 16388
'Print fHandleFile(xfile, WIN_NORMAL)
Else
MsgBox "Image does not exist.", vbOKOnly
End If
End If
End Sub
' = = = = = =
Thank you,
LSDean