MshflexGrid controls can be selected when clicked, but sometimes we need only one line, there is a tip:
Option explicitprivate suform_load () DIM I as integer, J AS integerwith mshflexgrid1.rows = 10.cols = 4for i = 1 to 9.TextMatrix (i, 0) = "" & I & "line" for j = 1 to 3.TextMatrix (0, j) = "of" & j & "column" .TextMatrix (i, j) = i & "," & jNextNext.SelectionMode = flexSelectionByRow.BackColorSel = vbGreen.ForeColorSel = vbRedEnd WithEnd SubPrivate Sub MSHFlexGrid1_MouseDown ( Button as integer, x askLE, Y askLE) with mshflexgrid1.row = .mouserow .col = 0 .colsel = .cols - 1 End welhend Sub