Hi i wonder if someone can tel me how can i do a multiple cell selection in MSFLEXGRID like the one in the attachment. I tried the selection mode but will not do it.
Thanks for the help.
Printable View
Hi i wonder if someone can tel me how can i do a multiple cell selection in MSFLEXGRID like the one in the attachment. I tried the selection mode but will not do it.
Thanks for the help.
I use this with the right mouse button, but you could just as easily use it with the leftCode: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
Thanks Hack, that is very good when we want to have one selection mode with left mouse button and another with the right. Unfortunately that will not do the type of selection i'm looking for. What i will like to be able to do is select any cell and as the mouse move it will highlight all the cells followed by the one initially selected and as the mouse passes a row all that row will be highlighted completly but the last row. Just like the image attached. Sorry for my english!
Thanks for the help!