Private Sub DataGrid1_KeyPress(KeyAscii As Integer)
On Error Resume Next
Dim row As Long, col As Long
row = DataGrid1.row
col = DataGrid1.col
If KeyAscii = 13 Then
If DataGrid1.col = DataGrid1.Columns.Count - 1 Then
DataGrid1.row = row + 1
DataGrid1.col = 0
Else
DataGrid1.col = col + 1
End If
End If
End Sub