News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

Use checkmark images to let the user check items in a grid in Excel VBA

Started by nandagopal, Nov 04, 2008, 01:28 PM

Previous topic - Next topic

nandagopal

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.