View Single Post
 
Old 08-22-2017, 08:28 AM
Goggy's Avatar
Goggy Goggy is offline
Contributor
 
Join Date: Sep 2005
Location: Enschede,The Netherlands
Posts: 670
Default

Dim I As Integer

For I = 0 To 15
If (I And 1) = 1 Then Debug.Print(CStr(I) & " First Bit is Set")
If (I And 2) = 2 Then Debug.Print(CStr(I) & " Second Bit is Set")
If (I And 4) = 4 Then Debug.Print(CStr(I) & " Third Bit is Set")
If (I And 8) = 8 Then Debug.Print(CStr(I) & " Fourth Bit is Set")
Next

The Rule Beeing
(Integer And Bit ) = Bit
__________________
As finishing touch, god created the Dutch!

utterly useless, but always trying to help
Reply With Quote