Private Sub Command2_Click()
Dim a As Integer, b As Integer
a = 99
b = 33
a = a Xor b
b = a Xor b
a = a Xor b
MsgBox a & " " & b
End Sub
Private Sub Command1_Click()
Dim a As Integer, b As Integer
a = 99
b = 14
b = a + b 'b = 99 + 14 = 113
a = b - a 'a 113 - 99 = 14
b = b - a 'b = 113 - 14 = 99
MsgBox "A = " & a
MsgBox "B = " & b
End Sub
Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.
If you're not already familiar with forums, watch our Welcome Guide to get started.
Join over 807,865 other people just like you!