Private Sub Command1_Click()
Dim i, j, k, l, iABCD, iCDC, iABC As Integer
Dim si, sj, sk, sl, sItem As String
For i = 0 To 9
For j = 0 To 9
For k = 0 To 9
For l = 0 To 9
si = Str(i)
sj = Str(j)
sk = Str(k)
sl = Str(l)
sItem = si & sj & sk & sl
iABCD = Val(sItem)
sItem = sk & sl & sk
iCDC = Val(sItem)
sItem = si & sj & sk
iABC = Val(sItem)
If iABCD - iCDC = iABC Then Print i, j, k, l
Next l
Next k
Next j
Next i
End Su