You can use the ExamineBit attribute function to check if one bit of the 32 available bits of a long variable is set.
Syntax | ||||
ExamineBit(Bit) | ||||
Return value | ||||
Type |
Description | |||
Boolean |
If the given bit is set, then return value is True | |||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
Bit |
Long |
ByVal |
Bit-number of 0-31 |
Example:
Dim L As Long
L := 72
MsgBox(L.ExamineBit(3))
The output is True, because Bit 3 (2^3) is set for the value 72.