Maybe I'm just broken, but I don't understand why the "or" operator won't work for me...
Doesn't work..
Does work...
If I put a valid number between 1 and 11 in with the first set of code it doesn't work. If I put in a valid number in the second piece of code it works correctly... WHY?
BTW... If I replace "LBound(arrServers)" and "UBound(arrServers)" with actual integers, the Or operator evaluates correctly.
PSC
Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
Doesn't work..
Code:
dim arrServers(10), intReturn
[blue]... populate array ...[/blue]
intReturn = InputBox("Type Server Number")
[red]If intReturn < LBound(arrServers) + 1 Or intReturn > UBound(arrServers) + 1 Then[/red]
MsgBox("You did not type the correct number")
End If
Does work...
Code:
[red]If intReturn => LBound(arrServers) + 1 And intReturn =< UBound(arrServers) + 1 Then[/red]
If I put a valid number between 1 and 11 in with the first set of code it doesn't work. If I put in a valid number in the second piece of code it works correctly... WHY?
BTW... If I replace "LBound(arrServers)" and "UBound(arrServers)" with actual integers, the Or operator evaluates correctly.
PSC
Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers