See my privious post
I would like to create a function for the OnKeyPress Event
for many controls and have the value of the of Keyascii passed to the function
On Key Press =ReplaceSpace(KeyAscii)
Instead of having to create this code for each control
I would like to create a function for the OnKeyPress Event
for many controls and have the value of the of Keyascii passed to the function
On Key Press =ReplaceSpace(KeyAscii)
Code:
Function ReplaceSpace(KeyAscii)
If KeyAscii = 32 Then
KeyAscii = 160
Else
KeyAscii = KeyAscii
End If
End Function
Instead of having to create this code for each control
Code:
Private Sub VStaffLastName_KeyPress(KeyAscii As Integer)
If KeyAscii = 32 Then KeyAscii = 160
End Sub