Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleSee which FlexGrid rows the user has selected
KeywordsFlexGrid, selected, rows
CategoriesControls
 
Use the Row and RowSel properties.
 
Private Sub cmdList_Click()
    ' Set start_row to the smaller of MSFlexGrid1.Row
    ' and MSFlexGrid1.Row. Make stop_row the larger.
    If MSFlexGrid1.Row > MSFlexGrid1.RowSel Then
        start_row = MSFlexGrid1.RowSel
        stop_row = MSFlexGrid1.Row
    Else
        start_row = MSFlexGrid1.Row
        stop_row = MSFlexGrid1.RowSel
    End If

    ' Loop through the selected rows.
    For i = start_row To stop_row
        txt = txt & MSFlexGrid1.TextMatrix(i, 0) & ": " & _
            MSFlexGrid1.TextMatrix(i, 1) & vbCrLf
    Next i

    MsgBox txt
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated