Private Sub txtName_KeyPress(KeyAscii As Integer)
Call CheckForEnter(KeyAscii)
End Sub
Private Sub MaskNumber_KeyPress(KeyAscii As Integer)
Call CheckForEnter(KeyAscii)
End Sub
Private Sub txtAddress_KeyPress(KeyAscii As Integer)
Call CheckForEnter(KeyAscii)
End Sub
After typing in name in a textbox, I press Enter to go to masked edit box to type in number. I then press Enter again to go to next textbox to type in address. With many boxes, I have to call the procedure in each one's KeyPress event.
I would like to know if there is a way to remove the need to call the procedure in each box's KeyPress event. Instead of having one KeyPress event for each box, there will be a single KeyPress event which will call the procedure for any box. I consider a collection of controls but I don't know how to create and implement it.
This post has been edited by AN1554: 30 September 2011 - 12:02 AM

New Topic/Question
Reply



MultiQuote




|