Question { 20949 }
X=10,Y=20 you need to swap the numbers without using a
third variable?
Answer
'a and b are two variables ; Following code swaps both number and string inputs
a = Inputbox("Enter a")
b = Inputbox("Enter b")
a = a + b
b = left(a,(instr(a,b)-1))
a = Right(a,(len(a)-len(b)))
msgbox "b ="&b
msgbox "a = "&a