Hi, what is the equivilant of the '|' (Logical OR) operator in Visual Basic? Thing is I thought it was 'Or' but that fails to operate on the code I have:
If ActiveSheet.Cells(crow, 10).Value <> 21 Or 42 Or 37 Then
Response = MsgBox("Print Me!", vbExclamation, "Error"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End If
I've tried enlosing in brackets and the values to test against in quotation "" marks, but still no joy. I reckon it doesn't act on numbers like that, or something. I'm used to C's syntax so this is all still a bit new![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Cheers guys
Joseph.
If ActiveSheet.Cells(crow, 10).Value <> 21 Or 42 Or 37 Then
Response = MsgBox("Print Me!", vbExclamation, "Error"
End If
I've tried enlosing in brackets and the values to test against in quotation "" marks, but still no joy. I reckon it doesn't act on numbers like that, or something. I'm used to C's syntax so this is all still a bit new
Cheers guys
Joseph.