Hi Guys,
Can anyone tell me how i can adapt this code.
Basically I use an input box and need a value of 0 or 1. If a different value is entered I want to goto the beginning so they have to enter 1 or 0.
I am not sure how to write this code
If x <> 0 Or <> 1 Then
To test if the value is 0 or 1 without splitting it into somthing like
if x <>0 then
if x <>1 then
gotojump1
This is undesirable as I want it in one line.
This is my code so far:
jump1:
x = InputBox("Which entry method do you wish to use?: " & vbCrLf & _
"Enter 1 for Replacement Method" & vbCrLf & "Enter 0 for New Line Method")
If Not IsNumeric(x) Then
MsgBox ("Not a Valid Entry!")
GoTo jump1
End If
If entryMethod <> 0 Or <> 1 Then
MsgBox ("Not a Valid Entry!")
GoTo jump1
End If
Thanks in advance,
Can anyone tell me how i can adapt this code.
Basically I use an input box and need a value of 0 or 1. If a different value is entered I want to goto the beginning so they have to enter 1 or 0.
I am not sure how to write this code
If x <> 0 Or <> 1 Then
To test if the value is 0 or 1 without splitting it into somthing like
if x <>0 then
if x <>1 then
gotojump1
This is undesirable as I want it in one line.
This is my code so far:
jump1:
x = InputBox("Which entry method do you wish to use?: " & vbCrLf & _
"Enter 1 for Replacement Method" & vbCrLf & "Enter 0 for New Line Method")
If Not IsNumeric(x) Then
MsgBox ("Not a Valid Entry!")
GoTo jump1
End If
If entryMethod <> 0 Or <> 1 Then
MsgBox ("Not a Valid Entry!")
GoTo jump1
End If
Thanks in advance,