J Trahair
Well-known member
Is there an equivalent of the VB6 thing where say textboxes could have an Index number so there is one set of events, shared by each indexed txtBox, eg. txtBox(0).Text, txtBox(7).Text, and:
Private Sub txtBox_KeyPress(Index As Integer, KeyAscii As Integer)
If Index = 3 Or Index = 5 Then
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End If
If Index = 8 Then
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub txtBox_KeyPress(Index As Integer, KeyAscii As Integer)
If Index = 3 Or Index = 5 Then
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End If
If Index = 8 Then
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub