Private Sub MSHFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'-------------------------------------------------------------------------------------------
' code in grid's DragDrop, MouseDown, MouseMove, and MouseUp events enables column dragging
'-------------------------------------------------------------------------------------------
If MSHFlexGrid1.MouseRow <> 0 Then Exit Sub
If MSHFlexGrid1.MouseCol = 0 And MSHFlexGrid1.FixedCols = 1 Then Exit Sub
xdn = x
ydn = y
m_iDragCol = -1 ' clear drag flag
m_bDragOK = True
'Start of your code
Dim CurrCol As Integer
If (Button = 1) Then ' Right Mouse Button
With MSHFlexGrid1 ' Set Object Reference
.Redraw = False ' Don't want visble feedback
CurrCol = .Col ' Keep track of current column
.Row = .FixedRows ' Any Non-Merged Row will do
.Col = 3 ' This is the URL Column
' Check if inside the URL column
If ((x >= .CellLeft) And (x <= .CellLeft + .CellWidth - 1)) Then
CurrCol = .Col ' Update the Current Column to the URL Col
' Trigger the Page
Dim lWebBrowse As InternetExplorer
Set lWebBrowse = New InternetExplorer
lWebBrowse.Stop
lWebBrowse.Visible = True
lWebBrowse.Navigate (MSHFlexGrid1.Text)
End If
.Col = CurrCol ' Return to Current Column
.Redraw = True ' Turn the Draw Back on
End With
End If
End Sub