Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleUse checkmark images to let the user check items in a grid in Excel VBA
DescriptionThis example shows how to use checkmark images to let the user check items in a grid in Excel VBA.
KeywordsExcel, VBA, grid, editable, FlexGrid
CategoriesOffice, 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.

 
 
Copyright © 1997-2006 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated