Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub test()
Dim int01 As Integer
int01 = [b]3[/b] ' another carefully chosen number
If int01 = [b](1 Or 2)[/b] Then ' now TRUE
MsgBox "Hmmm..."
End If
End Sub
If int01 = (5 Or 6) Then
Dim int01 As Integer
int01 = 5
Debug.Print int01 [COLOR=red]' shows as 5[/color red]
int01 = 5 Or 6
Debug.Print int01 [COLOR=red] ' shows as 7[/color red]
int01 = 5
If int01 = (5 Or 6) Then
Sub test()
Dim whatever()
Dim int01 As Integer
Dim check As Integer
Dim var
int01 = 5
check = int01
[COLOR=red]' text to show initial value of int01[/color red]
Selection.TypeText "int01 starts out = 5" & _
vbCrLf & vbCrLf
[COLOR=red]' make an array of 1 to 10[/color red]
whatever = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
For var = 0 To UBound(whatever())
[COLOR=red] ' use int01 and each of the array values[/color red]
int01 = int01 Or whatever(var)
[COLOR=red] ' type the result[/color red]
Selection.TypeText check & " OR " & _
whatever(var) & " = " & int01 & vbCrLf
[COLOR=red] ' explicitly reset int01 to 5[/color red]
int01 = 5
[COLOR=red] ' just to be sure it IS = 5[/color red]
check = int01
Next
End Sub
Sub What()
Debug.Print 5 Or 6 ' displays 7
Debug.Print 5 Or 7 ' ALSO displays 7
End Sub
Sub What_2()
Dim k As Integer
k = 5
k = k Or 6 ' or...ahem...7
MsgBox k + 7 ' displays [b]14[/b]
End Sub
int01 = 5
If int01 = (5 Or 6) Then
If int01 = (5 Or 6) Then
If int01 = 5 Or 6 Then