Here is a three part question that i am convinced will use the practically the same code, but I cannot fiqure the coreect syntax. I have been trying for:next combinations, anyways.
1. I have 13 textboxes in a userform that are named uni, uni2, uni3, uni4, etc... On the enter event in to the textbox I want that textbox to show the text =Each.
I have this code that works fine, however i have it thirteen times.
Private Sub uni13_enter()
uni13.Text = "Each"
End Sub
2. I think you get the drift, here I have thirteen textboxes that update totalt texbox on change. Again thirteen lines of codes just to rename from uprice, uprice1, uprice2, uprice3 etc....
Private Sub uprice_Change()
On Error Resume Next
total = uprice * quan
Totalt = Val(total.Text) + Val(total2.Text) + Val(total3.Text) + Val(total4.Text) + Val(Total5.Text) + Val(Total6.Text) + Val(Total7.Text) + Val(Total8.Text) + Val(Total9.Text) + Val(Total10.Text) + Val(total11.Text) + Val(Total12.Text) + Val(Total13.Text)
On Error Resume Next
End Sub
3. Still on the same userform, but a little different question, (same formula I think).
I have 13 comboboxes named modes, modes2, modes3, modes4 etc....
What code can I use to check to make sure that none of the comboboxes contain the same value.
if modes = modes2 then
msgbox YOU CANNOT ENTER THE SAME VALUE.
This userform has 104 textboxes, and 39 comboxes not to mention optionbuttons and commandbuttons. The code is just become to large to work with.
On a bright note it does all work except for question number 3.
Any help would be appreciated.
Thanks
-D
1. I have 13 textboxes in a userform that are named uni, uni2, uni3, uni4, etc... On the enter event in to the textbox I want that textbox to show the text =Each.
I have this code that works fine, however i have it thirteen times.
Private Sub uni13_enter()
uni13.Text = "Each"
End Sub
2. I think you get the drift, here I have thirteen textboxes that update totalt texbox on change. Again thirteen lines of codes just to rename from uprice, uprice1, uprice2, uprice3 etc....
Private Sub uprice_Change()
On Error Resume Next
total = uprice * quan
Totalt = Val(total.Text) + Val(total2.Text) + Val(total3.Text) + Val(total4.Text) + Val(Total5.Text) + Val(Total6.Text) + Val(Total7.Text) + Val(Total8.Text) + Val(Total9.Text) + Val(Total10.Text) + Val(total11.Text) + Val(Total12.Text) + Val(Total13.Text)
On Error Resume Next
End Sub
3. Still on the same userform, but a little different question, (same formula I think).
I have 13 comboboxes named modes, modes2, modes3, modes4 etc....
What code can I use to check to make sure that none of the comboboxes contain the same value.
if modes = modes2 then
msgbox YOU CANNOT ENTER THE SAME VALUE.
This userform has 104 textboxes, and 39 comboxes not to mention optionbuttons and commandbuttons. The code is just become to large to work with.
On a bright note it does all work except for question number 3.
Any help would be appreciated.
Thanks
-D