See my post below titled: "Data string with bits and words" or you can use
boolean operators to determine with bits are on for instance:
If (myByteVar And 1) Then
' first bit is on
ElseIf (myByteVar And 2) Then
' second bit is on
ElseIf (myByteVar And 4) Then
' third bit is on
ElseIf (myByteVar And 8) Then
' you get the idea
ElseIf (myByteVar And 16) Then
ElseIf (myByteVar And 32) Then
ElseIf (myByteVar And 64) Then
ElseIf (myByteVar And 128) Then
' eighth bit is on
End If