J
jontait
Hi, I curently use the following code so that when a user presses th
button it will load up a PDF document on our Intranet. However, whe
clicked Excel opens up a small dialoguebox warning the user abou
viruses and asking them to OK or CANCEL, all is fine if they hit OK i
just loads the file, but if they hit CANCEL it goes into DEBUG mod
which I don't want.
Is it possible for the code to be improved to bypass that dialogue bo
so the answer is always YES if activated from this button?
Also if the page can't be found I'd ideally like some kind of messag
box to appear saying that the Internet page can not be found etc etc
something along the lines of the one in the code below which work
great if the file is on a drive (local or network) and not on th
intra/internet.
Any help will be greatly appreciated
Private Sub CommandButton1_Click()
If ("http://intranet/help.pdf") = "" Then
MsgBox "Sorry this file has been moved, renamed or the network drive i
refers to is no longer available", vbOKOnly + vbCritical
Else
ActiveWorkbook.FollowHyperlink Address:="http://intranet/help.pdf"
NewWindow:=True
End If
End Su
button it will load up a PDF document on our Intranet. However, whe
clicked Excel opens up a small dialoguebox warning the user abou
viruses and asking them to OK or CANCEL, all is fine if they hit OK i
just loads the file, but if they hit CANCEL it goes into DEBUG mod
which I don't want.
Is it possible for the code to be improved to bypass that dialogue bo
so the answer is always YES if activated from this button?
Also if the page can't be found I'd ideally like some kind of messag
box to appear saying that the Internet page can not be found etc etc
something along the lines of the one in the code below which work
great if the file is on a drive (local or network) and not on th
intra/internet.
Any help will be greatly appreciated
Private Sub CommandButton1_Click()
If ("http://intranet/help.pdf") = "" Then
MsgBox "Sorry this file has been moved, renamed or the network drive i
refers to is no longer available", vbOKOnly + vbCritical
Else
ActiveWorkbook.FollowHyperlink Address:="http://intranet/help.pdf"
NewWindow:=True
End If
End Su