When I want to highlight a whole bunch of rows in an MSFlexGrid, I like to use the Right Mouse Button, so I use this code. However, if you prefer using the Left Mouse Button, then just modify this accordingly.VB Code:
Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) If Button = vbRightButton Then With MSFlexGrid1 .Row = .MouseRow .Col = .MouseCol End With End If End Sub Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) If Button = vbRightButton Then With MSFlexGrid1 .ColSel = .MouseCol .RowSel = .MouseRow End With End If End Sub




Reply With Quote