0

This is probably a simple one, but I can't seem to find out what's wrong:

if temp_array(1) = temp_string2 & temp_array(2) = "w" then
....
end if

the values are:

temp_array(1) = "test1"

temp_string2 = "test2"

temp_array(2) = "w"

I get a type mismatch error highlighting the conditional comparisons...

1 Answer 1

3

& is string concatenation, not logical and.

if temp_array(1) = temp_string2 And temp_array(2) = "w" then 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.