Private Sub Command1_Click()
Randomize
Dim a As Long, b As Long, n As Integer
a = Rnd * 1000 + 1
Do While True
b = rev(a)
If b = a Or n = 7 Then Exit Do
Print a; "+"; b; "="; a + b
a = a + b
n = n + 1
Loop
End Sub
Function rev(ByVal x)
While x > 0
y = y * 10 + x Mod 10
x = x \ 10
Wend
rev = y
End Function