RE:Grid con celdas editables
Hola.. yo uso el msflexgrid, te paso el codigo que lo hace editable, funciona muy bien, yo lo tengo en funcionamiento en una aplicacion de facturacion... Al msflexgrid lo llamo factura2
Private Sub facturas2_KeyPress(KeyAscii As Integer)
'ESTE CODIGO EDITA EL MSFLEXGRID
With facturas2
Select Case KeyAscii
Case vbKeyReturn
If .col + 1 <= .Cols - 2 Then
If .col = 1 Then
.col = .col + 2
Else
.col = .col + 1
End If
ElseIf .Row + 1 <= .Rows - 1 Then
.Row = .Row + 1
.col = 1
Else
.Row = 1
.col = 1
End If
Case vbKeyBack
'CUANDO LE DOY CON LA TECLA BACK, BORRA LOS DATOS DE LA CELDA
If Trim(.Text) <> "" Then
.Text = Mid(.Text, 1, Len(.Text) - Len(.Text)) 'para borrar todo el contenido'
End If
Case Is < 32
Case Else
If .col = 0 Or .Row = 0 Then
Exit Sub
Else
.Text = .Text & Chr(KeyAscii)
End If
End Select
End With
End Sub
Espero que te sirva....
Saludos
Héctor