I've been designing a userForm where the user can input a certain string into an Inputbox which will set off a load of Macros. The problem is that the Inputbox comes up multiple times depending on which code the user inputs.
For example, if the user inputs 100H2102 it does it first time. If he types in 250H2204 they have to type it twice.
Is there a way for it to just come up once, instead of looping constantly?
Any help with this problem would be much appreciated. I've included a section of the code below for extra explanation:
Sub CommandButton1_Click()
If InputBox("Input Corrugation (Cell B3)") = "100H2102" Then
If InputBox("Input Wavepitch (Cell E9)") = "0.625" Then
Range("H6").Value = "1042"
AppendToExisitingOnRight
AppendToExistingOnLeft
Macro1
Macro2_1
Macro3
Macro4
Macro5
Macro6
Macro7
Macro8
Macro9
End If
Else
If InputBox("Input Corrugation (Cell B3)") = "250H2204" Then
Range("H6").Value = "1232"
AppendToExisitingOnRight
AppendToExistingOnLeft
Macro1
Macro2_2
Macro3
Macro4
Macro5
Macro6
Macro7
Macro8
Macro9
End If
End If
End Sub
For example, if the user inputs 100H2102 it does it first time. If he types in 250H2204 they have to type it twice.
Is there a way for it to just come up once, instead of looping constantly?
Any help with this problem would be much appreciated. I've included a section of the code below for extra explanation:
Sub CommandButton1_Click()
If InputBox("Input Corrugation (Cell B3)") = "100H2102" Then
If InputBox("Input Wavepitch (Cell E9)") = "0.625" Then
Range("H6").Value = "1042"
AppendToExisitingOnRight
AppendToExistingOnLeft
Macro1
Macro2_1
Macro3
Macro4
Macro5
Macro6
Macro7
Macro8
Macro9
End If
Else
If InputBox("Input Corrugation (Cell B3)") = "250H2204" Then
Range("H6").Value = "1232"
AppendToExisitingOnRight
AppendToExistingOnLeft
Macro1
Macro2_2
Macro3
Macro4
Macro5
Macro6
Macro7
Macro8
Macro9
End If
End If
End Sub