Hello All,
Posted is my code:
______________________________________________________________________
Private Sub UserForm_Initialize()
key = InputBox("Which Line is this for?", "Line # ?, please enter ONLY a number")
If key = "1" Then
ElseIf key = "2" Then
ElseIf key = "3" Then
ElseIf key = "4" Then
ElseIf key = "5" Then
ElseIf key = "6" Then
ElseIf key = "7" Then
ElseIf key = "8" Then
ElseIf key = "9" Then
ElseIf key = "10" Then
ElseIf key = "11" Then
ElseIf key = "12" Then
Else
Unload Me
MsgBox ("You must enter a number, as indicated")
Exit Sub
End If
End Sub
________________________________________________________________
I have this running as a userform initializes so that I can capture a variable that I use to inject information back into the document (in more than one place).
For the life of me, I can not figure out what I have wrong. Any help would be appreciated!
Thank you
Posted is my code:
______________________________________________________________________
Private Sub UserForm_Initialize()
key = InputBox("Which Line is this for?", "Line # ?, please enter ONLY a number")
If key = "1" Then
ElseIf key = "2" Then
ElseIf key = "3" Then
ElseIf key = "4" Then
ElseIf key = "5" Then
ElseIf key = "6" Then
ElseIf key = "7" Then
ElseIf key = "8" Then
ElseIf key = "9" Then
ElseIf key = "10" Then
ElseIf key = "11" Then
ElseIf key = "12" Then
Else
Unload Me
MsgBox ("You must enter a number, as indicated")
Exit Sub
End If
End Sub
________________________________________________________________
I have this running as a userform initializes so that I can capture a variable that I use to inject information back into the document (in more than one place).
For the life of me, I can not figure out what I have wrong. Any help would be appreciated!
Thank you