hey, I have a multiple handle procedure and all i need to do is found out which control activated the event (I think it has to do with the "sender"
Private Sub alltxts_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles sdt1.KeyPress, sdt2.KeyPress, sdt3.KeyPress, sdt4.KeyPress, sdt5.KeyPress, sdt6.KeyPress, sdt7.KeyPress, sdt8.KeyPress
If valtxt(e.KeyChar) = False And Asc(e.KeyChar) <> Keys.Back Then e.Handled = True : MsgBox("You can only enter numbers and decimals"
End Sub
(for ex: if sdt6_keypress was the one who triggered the event)
______
thanks
Private Sub alltxts_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles sdt1.KeyPress, sdt2.KeyPress, sdt3.KeyPress, sdt4.KeyPress, sdt5.KeyPress, sdt6.KeyPress, sdt7.KeyPress, sdt8.KeyPress
If valtxt(e.KeyChar) = False And Asc(e.KeyChar) <> Keys.Back Then e.Handled = True : MsgBox("You can only enter numbers and decimals"
End Sub
(for ex: if sdt6_keypress was the one who triggered the event)
______
thanks