Just another msflexgrid's topic..
does anyone know how to validate the cell from msflexgrid?
for example i want to validate the column(3) if it's not numeric (after editing) then it would disable moving to other cells until it completely fulfill the condition.
Here's my code
It works but it wont disable the movement when i typed data that is not numeric =(
does anyone know how to validate the cell from msflexgrid?
for example i want to validate the column(3) if it's not numeric (after editing) then it would disable moving to other cells until it completely fulfill the condition.
Here's my code
Code:
Private Sub MSFlexGrid1_LeaveCell()
For i = 1 To MSFlexGrid1.Rows - 2
If IsNumeric(MSFlexGrid1.TextMatrix(i, 3)) Then
MSFlexGrid1.CellBackColor = &H80000005
Else
MsgBox "data invalid"
End If
Next
End Sub
Comment