Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Someone else posted this really useful code for validating textboxes:
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case 48 To 57 'numbers Case Else 'Discard anything else Beep KeyAscii = 0 End Select End Sub Only problem is that I have numerous textboxes to check and I've currently listed this for every box. How do I package this so that for each textbox I can use something similar to: Private Sub txtBankNum4_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Call NumCheck End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
calling C# DLL from VBA | Excel Programming | |||
Calling an XLL from VB? | Excel Programming | |||
Need Help Using/Calling DLL Please | Excel Programming | |||
Calling an Add-In | Excel Discussion (Misc queries) | |||
Calling SUB | Excel Programming |