|
|
Title | Use checkmark images to let the user check items in a grid in Excel VBA |
Description | This example shows how to use checkmark images to let the user check items in a grid in Excel VBA. |
Keywords | Excel, VBA, grid, editable, FlexGrid |
Categories | Office, Controls |
|
|
The UserForm contains checked and unchecked images in the imgChecked and imgUnchecked controls. When the user clicks on a row, the program toggles whether the first column contains the checked or unchecked picture.
|
|
' Toggle this row.
Private Sub flxAnimals_Click()
If flxAnimals.CellPicture Is imgChecked.Picture Then
Set flxAnimals.CellPicture = imgUnchecked.Picture
Else
Set flxAnimals.CellPicture = imgChecked.Picture
End If
End Sub
|
|
See the rest of the code for details.
For more information on programming the Microsoft Office applications, see my book Microsoft Office Programming: A Guide for Experienced Developers.
|
|
|
|
|
|