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
 
 
 
 
 
TitleDisplay checkboxes in an MSFlexGrid control
Keywordscheck box, CheckBox, grid
CategoriesControls
 
Display checked and unchecked pictures in the cells. When the user clicks on a cell, toggle the picture.

You could easily change the pictures to be happy and sad faces, cars, or whatever is appropriate.

 
' Toggle the check box.
Private Sub MSFlexGrid1_Click()
    If MSFlexGrid1.Col < 1 Or MSFlexGrid1.Row < 1 Then Exit _
        Sub

    If MSFlexGrid1.CellPicture = picChecked Then
        Set MSFlexGrid1.CellPicture = picUnchecked
    Else
        Set MSFlexGrid1.CellPicture = picChecked
    End If
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated