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:
MsgBox "Row: " & MSFlexGrid1.Row & " Col: " & MSFlexGrid1.Col
Printable View
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:
MsgBox "Row: " & MSFlexGrid1.Row & " Col: " & MSFlexGrid1.Col
Since headers are in the Row(0) all you have to do is to use first row and current columns index:
VB Code:
Private Sub FlexGrid1_Click() With FlexGrid1 MsgBox .TextMatrix(0, .Col) & ": " & .TextMatrix(.Row, .Col) End With End Sub 'OR Private Sub FlexGrid1_SelChange() With FlexGrid1 MsgBox .TextMatrix(0, .Col) & ": " & .TextMatrix(.Row, .Col) End With End Sub 'OR use any other event that you might find usefull '...
Can you check this thread to see what exactly what I'm trying to do.
http://vbforums.com/showthread.php?t=397327