DavidH7470
asked on
Excel 2003 VB Variable used in Controls of user froms.
Hello,
I am creating a user form in Excel that has a number of text boxes that a user enters data into. Some are to be numeric only. If a user enters non-numeric data in the box there is code to catch that and return a zero value and lets the user know. Rather than right the code for each box I assign a integer variable to the code on each TextBox and pass that along to a public function that uses that to create a variable representing the TextBox control name. ie It takes "TextBox" and combines it with 1, 2, 3, etc and uses that as the control name to run the routine. It fails please help. Sample is attached. Text-Box-Variable.xls
I am creating a user form in Excel that has a number of text boxes that a user enters data into. Some are to be numeric only. If a user enters non-numeric data in the box there is code to catch that and return a zero value and lets the user know. Rather than right the code for each box I assign a integer variable to the code on each TextBox and pass that along to a public function that uses that to create a variable representing the TextBox control name. ie It takes "TextBox" and combines it with 1, 2, 3, etc and uses that as the control name to run the routine. It fails please help. Sample is attached. Text-Box-Variable.xls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER