|
|
Title | Let the user check items in a grid in Excel VBA |
Description | This example shows how to let the user check items in a grid in Excel VBA |
Keywords | Excel, VBA, grid, editable, FlexGrid |
Categories | Office, Controls |
|
|
When the user clicks on a row, the program toggles whether the first column contains an X.
|
|
' Toggle this row.
Private Sub flxAnimals_Click()
If flxAnimals.TextMatrix(flxAnimals.Row, 0) = "X" Then
flxAnimals.TextMatrix(flxAnimals.Row, 0) = ""
Else
flxAnimals.TextMatrix(flxAnimals.Row, 0) = "X"
End If
End Sub
|
|
See the code for additional details.
For more information on programming the Microsoft Office applications, see my book Microsoft Office Programming: A Guide for Experienced Developers.
|
|
|
|
|
|