D
David McRitchie
One annoyance I have with Event macros is that I have to select
another cell afterwards so that I can work in the VBE to make
changes to the macro. Even if I exit out of IE after invoking
the following Event macro, I still have to select a cell so that
I can edit the macro. Is there a way around this?
You can test the following by double-clicking on either
of the following cells, and then trying to edit the event macro.
A2: userid.htm
A3: strings.htm
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim filename As String, IEpath As String
Dim RetVal As Long
IEpath = "C:\program files\internet explorer\iexplore.exe"
If ActiveCell.Column = 1 Then
If Right(LCase(ActiveCell.Value), 4) = ".htm" Then
filename = "http://www.mvps.org/dmcritchie/excel/" _
& Trim(ActiveCell.Value)
Shell IEpath & " " & filename, vbNormalFocus
End If
End If
End Sub
another cell afterwards so that I can work in the VBE to make
changes to the macro. Even if I exit out of IE after invoking
the following Event macro, I still have to select a cell so that
I can edit the macro. Is there a way around this?
You can test the following by double-clicking on either
of the following cells, and then trying to edit the event macro.
A2: userid.htm
A3: strings.htm
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim filename As String, IEpath As String
Dim RetVal As Long
IEpath = "C:\program files\internet explorer\iexplore.exe"
If ActiveCell.Column = 1 Then
If Right(LCase(ActiveCell.Value), 4) = ".htm" Then
filename = "http://www.mvps.org/dmcritchie/excel/" _
& Trim(ActiveCell.Value)
Shell IEpath & " " & filename, vbNormalFocus
End If
End If
End Sub