Public Function SetBit(bytByte As Byte, bytBit As Byte) As Byte SetBit = bytByte Or (2 ^ bytBit) End Function Public Function ClearBit(bytByte As Byte, bytBit As Byte) As Byte ClearBit = bytByte And Not (2 ^ bytBit) End Function Public Function IsBitSet(bytByte As Byte, bytBit As Byte) As Boolean IsBitSet = ((bytByte And (2 ^ bytBit)) > 0) End Function Public Function ToggleBit(bytByte As Byte, bytBit As Byte) As Byte ToggleBit = bytByte Xor (2 ^ bytBit) End Function