Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a set of textbox controls on a userform called n1,
n2 etc. I have a common function that needs to handle each of these controls after they are updated. I want the name (n1, etc..) to be passed to the function and substituted into the code that then runs against this control. How to I pass the control name into the function? What I have does not work! ' control n1 Private Sub n1_AfterUpdate() ValidateNumber("n1") End Sub ' control n2 Private Sub n2_AfterUpdate() ValidateNumber("n2") End Sub 'Function (example to test value passed Private Function ValidateNumber(nBox) MsgBox nBox.Value End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
passing values to other sheets | New Users to Excel | |||
Passing values in Sheet to VBA | Charts and Charting in Excel | |||
Passing values between 2 subs ? | Excel Programming | |||
passing values from one sheet to another | Excel Programming | |||
Userform and passing date values | Excel Programming |