Results 1 to 3 of 3

Thread: [RESOLVED] Msflexgrid click

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    114

    Resolved [RESOLVED] Msflexgrid click

    I know that the code below with give me column and row info but how do I get information from header. The header is filled from a db with field named PersonName and PersonID.

    VB Code:
    1. MsgBox "Row: " & MSFlexGrid1.Row & " Col: " & MSFlexGrid1.Col
    Attached Images Attached Images  

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Msflexgrid click

    Since headers are in the Row(0) all you have to do is to use first row and current columns index:
    VB Code:
    1. Private Sub FlexGrid1_Click()
    2.     With FlexGrid1
    3.         MsgBox .TextMatrix(0, .Col) & ": " & .TextMatrix(.Row, .Col)
    4.     End With
    5. End Sub
    6.  
    7. 'OR
    8.  
    9. Private Sub FlexGrid1_SelChange()
    10.     With FlexGrid1
    11.         MsgBox .TextMatrix(0, .Col) & ": " & .TextMatrix(.Row, .Col)
    12.     End With
    13. End Sub
    14.  
    15. 'OR use any other event that you might find usefull
    16. '...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    114

    Re: Msflexgrid click

    Can you check this thread to see what exactly what I'm trying to do.

    http://vbforums.com/showthread.php?t=397327

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width