Greetings, Here is a snippet of code that I am using to have a textbox in a userform call up a specific WS.
dmt32 recently sent me this code tweak (thanks dmt32) for another project that worked great, but this code was just to locate the textboxes and clear their contents; not to see the value in a single textbox and pass it on to the code.
I am wondering if I can apply this same principle to this set of code as well, so much cleaner....
Code:
If TextBox43 = 1 Then
Sheet1.Activate
End If
If TextBox43 = 2 Then
Sheet2.Activate
End If
If TextBox43 = 3 Then
Sheet3.Activate
End If
If TextBox43 = 4 Then
Sheet4.Activate
End If
...all the way up to textbox43 = 40
dmt32 recently sent me this code tweak (thanks dmt32) for another project that worked great, but this code was just to locate the textboxes and clear their contents; not to see the value in a single textbox and pass it on to the code.
Code:
Dim i As Integer
For i = 1 To 40
Me.Controls("TextBox" & i).Text = ""
Next i
TextBox43 = ""
I am wondering if I can apply this same principle to this set of code as well, so much cleaner....