Posted 8 September 2017, 1:15 pm EST
I want validate the spread cell such that the user can
enter only numbers. I cant use the celltype in the spread design
as the maximum value that can be entered is 99999999999999(14 times).
i am in a requirement such that i should be able to show 9(60 times).
so how can i validate the cell such that only numbers are entered into the cell.
i used the following method,,
Private Sub spdSampleIndex_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles spdSampleIndex.KeyPress
If (Asc(e.KeyChar) >= 48 Or Asc(e.KeyChar) <= 57) Then
so that for every key press i can check if the key pressed is a number or not.
but the key press event is not getting triggered every time the number is entered .
instead it is getting triggered only for the first time the key is pressed in the cell.
so can u please tell me which event i can use to check for every key that is pressed in the spread cell.