Hi. I'm trying to create a popup confirmation window, which should appear after clicking on a hyperlink and ask if it should be opened or not.
The popup works, but the link opens up anyway, even before the popup appears.
Is there a way to prevent this from happening? Then, if the answer is Yes, resume it, if not, cancel it.
VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim a As Integer
a = MsgBox("Do you want to follow this link?", vbExclamation + vbYesNo + vbApplicationModal, "Warning")
If a = vbNo Then ???
The popup works, but the link opens up anyway, even before the popup appears.
Is there a way to prevent this from happening? Then, if the answer is Yes, resume it, if not, cancel it.