Hi
I have 31 textboxes alongside 31 spinbuttons. I will need to set the textbox text equal to the spin button value .i.e
Textbox1.Text = SpinButton1.value
Textbox2.Text = SpinButton2.value etc....for each 31 boxes
I will then set the event handler for each textbox, i.e
Dim NewVal as Integer
NewVal = Val(Textbox1.Text)
If NewVal >=Spinbutton1.Min And NewVal <=SpinButton1.Max Then _
SpinButton1.Value = NewVal
I dont wat to have to write this out 31 times for each textbox and spinbutton.
Is there code I can write with a variable to assign each Textbox value to its corresponding spinbutton, and the same for assigning textbox event handler.
I would like these values to be assigned when the userform is opened .i.e. Userform1.show.
Thanks
Mosiki
I have 31 textboxes alongside 31 spinbuttons. I will need to set the textbox text equal to the spin button value .i.e
Textbox1.Text = SpinButton1.value
Textbox2.Text = SpinButton2.value etc....for each 31 boxes
I will then set the event handler for each textbox, i.e
Dim NewVal as Integer
NewVal = Val(Textbox1.Text)
If NewVal >=Spinbutton1.Min And NewVal <=SpinButton1.Max Then _
SpinButton1.Value = NewVal
I dont wat to have to write this out 31 times for each textbox and spinbutton.
Is there code I can write with a variable to assign each Textbox value to its corresponding spinbutton, and the same for assigning textbox event handler.
I would like these values to be assigned when the userform is opened .i.e. Userform1.show.
Thanks
Mosiki