QUOTE(vbcodepra @ 6 May, 2008 - 12:20 AM)

the data should be enterd by using textbox, this textbox should be placed in mshflexgrid ,
and also by pressing the tab it should move to net cell in msflexgrid
CODE
Private Type FlxCell
row As Long
col As Long
End Type
Private m_ActiveCell As FlxCell
'Undo
Private Type UndoType
uText As String 'The whole Grid
uRows As Long 'Count of Rows
uCols As Long 'Count of Cols
uName As String 'Undo Name
End Type
Private Sub Form_Load()
MSFlexGrid1.RowHeightMin = Text1.Height
MSFlexGrid1.ColWidth(0) = 100
Text1.Visible = False
End Sub
Private Sub MSFlexGrid1_DblClick()
If MSFlexGrid1.row > 0 Then
m_ActiveCell.row = MSFlexGrid1.row
m_ActiveCell.col = MSFlexGrid1.col
With Text1
.Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
.Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
.Width = MSFlexGrid1.CellWidth
.Text = MSFlexGrid1.Text
.Visible = True
.ZOrder
.SetFocus
End With
End If
End Sub
Private Sub Text1_LostFocus()
MSFlexGrid1.TextMatrix(m_ActiveCell.row, m_ActiveCell.col) = Text1.Text
Text1.Visible = False
End Sub