Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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...

share|improve this question

1 Answer

up vote 3 down vote accepted

& is string concatenation, not logical and.

if temp_array(1) = temp_string2 And temp_array(2) = "w" then 
share|improve this answer
ah shoot. thanks! – Ehudz Aug 17 '12 at 18:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.