You probably want an and
...
Do
myValue = InputBox("Enter something")
Loop While Not myValue = "apple" And Not myValue = "orange"
Not ands and Not ors are confusing, but if you work it through, you'll figure it out. Example input: apple
NOT "apple" = "apple"
is FALSE
, and NOT "apple" = "orange"
is TRUE
. If you use an OR
, TRUE or FALSE
evaluates to TRUE
. Therefore the loop continues. But if you use an AND
, the whole statement evaluates to FALSE
, which allows an exit.