Article ID: 187834
Article Last Modified on 7/13/2004
Private Sub Command1_Click()
' unselect a range
With MSFlexGrid1
' cancel selection by setting end points to start points
.RowSel = .Row
.ColSel = .Col
.SetFocus
End With
End Sub
Private Sub Command2_Click()
' select a range
With MSFlexGrid1
' Row and Col properties must be set before RowSel and ColSel
.Col = 0 ' start selection in this column
.Row = 2 ' start selection in this row
.ColSel = 1 ' end selection in this column
.RowSel = 4 ' end selection in this row
.SetFocus
End With
End Sub
Private Sub Form_Load()
With MSFlexGrid1
.Clear
.FixedCols = 0
.FixedRows = 0
.AddItem "mike" & vbTab & 10, 0
.AddItem "fred" & vbTab & 11, 1
.AddItem "jack" & vbTab & 13, 2
.AddItem "herman" & vbTab & 55, 3
.AddItem "irene" & vbTab & 88, 4
.AddItem "jane" & vbTab & 22, 5
End With
End Sub
Additional query words: kbDSupport kbDSD flex grid kbVBp kbVBp500 kbCtrl kbVBp600
Keywords: kbhowto KB187834