Here is how you can input and retrieve data into and from Microsoft Flex gridcontol in Visual Basic 6, just drag and drop and text box and flex grid. and do these code
Private Sub Form_Load()
Call MSFlexGrid1_EnterCell
End SubPrivate Sub MSFlexGrid1_EnterCell()
With MSFlexGrid1
Text1.Top = .CellTop + .Top
Text1.Width = .CellWidth
Text1.Left = .CellLeft + .Left
Text1.Text = .Text
End With
End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
MSFlexGrid1.Text = Text1
If MSFlexGrid1.Col < MSFlexGrid1.Cols – 1 Then
MSFlexGrid1.Col = MSFlexGrid1.Col + 1
MSFlexGrid1_EnterCell
Else
If MSFlexGrid1.Row < MSFlexGrid1.Rows – 1 Then
MSFlexGrid1.Row = MSFlexGrid1.Row + 1
MSFlexGrid1.Col = 1
End If
End If
End If
End Sub