You can use the ClearBit attribute function to reset one bit of the 32 available bits of a long variable.
|
Syntax | ||||
|
ClearBit(Bit) | ||||
|
Return value | ||||
|
None | ||||
|
Parameter | ||||
|
Use |
Name |
Type |
Passing |
Description |
|
Required |
Bit |
Long |
ByVal |
Bit-number of 0-31 |
Example:
Dim V As Long := 255
V.ClearBit(3)
The value of V is 247.
This can also be done by:
Dim V As Long := 255
V := V And Not (2 ^ 3)