How Do You Stop Annoying Excel Message Boxes?
Colin Hayes wrote...
....
Could this be extended , I wonder , to cover any hyperlink within a
named range of cells? More generic , so that any hyperlink clicked with
the named range would be run?
....
Define RunEXE as Sheet1!A3:A6 and enter the following into A3:A6.
winver
calc
notepad
mspaint
Enter foobar into Sheet1!A7. Make each of these a hyperlink pointing
to its own cell. Then use the event handler in Sheet1's class module.
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
With Me.Parent.Names("RunEXE")
If Not Intersect(Target.Range, .RefersToRange) Is Nothing Then _
Shell Target.Range.Text, vbNormalFocus
End With
End Sub
|