On Sat, 02 Jul 2005 14:13:10 -0400, MLH <CR**@NorthState.net> wrote:

That's why we have XOR:

Sub x2()

Dim A As Integer

Dim B As Integer

A = 10 ' or any other number

B = 20 ' or any other number

A = A Xor B

A = A Xor B

Debug.Print A

End Sub

If I have an integer A and I logically AND it

with some other integer B to produce a result

C, can I then perform some kind of reverse

operation with B and C to get back the original

number A?

If so, is it guaranteed to work every time with

all integers A and B?