Home > Software engineering >  How the VB in the text of the keypress module of function called?
How the VB in the text of the keypress module of function called?

Time:01-07

Is now in the textbox keypress restrictions can only enter a decimal point, how such restrictions in every form of the text box? How to add the function that the call?

Private Sub Text1_KeyPress (KeyAscii As Integer)

If InStr (Text1. Text, ". ") And 46 Then KeyAscii=

KeyAscii=0

End the If
End Sub
At present is to want to write the code in the module, but don't know how to call each text box? Novice,

CodePudding user response:

Should need to need to write every TextBox, of course, can also be to integrate the TextBox control all the requirements for control arrays, it may be a little easier,
  • Related