-
Ok this question is lame. But I searching for the answer on MSDN Online has turned up NADA. So I come to the benevolent souls on this message board.
Ok... I don't know how to use AND and OR statements in VB. Here is my code snipit. If figured it has something to do with the parenthesis and the "&". Maybe someone can help a brotha' out.
Do While ((currentArrayLocation < 10) & (inTopTen = False))
If (Worksheets("Sheet5").Range("H" & rangeInt).Value >= currentArray(currentArrayLocation).clicks) Then
inTopTen = True
Else
currentArrayLocation = currentArrayLocation + 1
End If
Loop
Thanks in advance,
cLocKwOrk
-
You're right. The symbol "&" refers to BIT-WISE, that is
each bit is check against the other and all must be the
same. Its kinda like looking for an exact match.
The function AND will check that each element is a true
statement. Irrespective of the individual values of the
variables.
Dump the &, use AND
Good Luck
DerFarm
-
Try
In VB, "&" is a string concatenation operator: Try "And" instead. Use "Or" and "Xor" for other logical operations.
-
Sweet
Sweeeeeeeeeeeeeet!
Thanks for the help guys. =)
-cLocKwOrk