Hey, how can I allow the user to edit ANY cell from any row and column in an msflexgrid ? I found the following code, but it only allows input for the first column. Thank you in advance.
Private Sub MSFlexGrid1_Key Press(KeyAscii As Integer)
Dim sTemp As String
With MSFlexGrid1
sTemp = .TextMatrix(.ro w, .Col)
Select Case KeyAscii
Case 8 ' backspace
If Len(sTemp) > 0 Then
sTemp = Left$(sTemp, Len(sTemp) - 1)
End If
Case 27 ' escape
sTemp = ""
Case 0 To 31
KeyAscii = 0
Case Else
sTemp = sTemp & Chr$(KeyAscii)
End Select
.TextMatrix(.ro w, .Col) = sTemp
End With
End Sub
Private Sub MSFlexGrid1_Key Press(KeyAscii As Integer)
Dim sTemp As String
With MSFlexGrid1
sTemp = .TextMatrix(.ro w, .Col)
Select Case KeyAscii
Case 8 ' backspace
If Len(sTemp) > 0 Then
sTemp = Left$(sTemp, Len(sTemp) - 1)
End If
Case 27 ' escape
sTemp = ""
Case 0 To 31
KeyAscii = 0
Case Else
sTemp = sTemp & Chr$(KeyAscii)
End Select
.TextMatrix(.ro w, .Col) = sTemp
End With
End Sub
Comment