Excel Hangs when using Offset in formula. A bug? (Solved)
Thanks a lot NickHK! Never had I taken the time to find out what it
was all about these bitwise comparison. I couldn't understand this
matter by just the scarce explanation in the VBA help files. This is a
great hint. I liked this one. I found some more detailed source on the
internet: "How to utilize binary flags in your program"<
http://www.vb6.us/tutorials/how-utilize-binary-flags-your-program
It could be that I didn't understand it completely. Please correct me
if so. A Long variable is 32 bits. So you can store 32 flags. (One bit
is used for the minus sign.)
Suppose I've 4 flags and I would like to know if all flags are
checked, assuming that the last bit is used for signing, the Long
variable has to be 15.
BIN2DEC(00000000000000000000000000001111) = 15
BIN2DEC(10000000000000000000000000001111) = -15
In short: I used a method, one that's quick and dirty. The mysteries
aren't solved, but it won't keep me awake any longer.
Thanks again,
Bart
|