Option Explicit
Private Sub Command1_Click()
Dim i As Long
For i = 1 To 10000
If f1(i) = True And f1(i ^ 2) = True Then List1.AddItem i & "^" & "2" & "=" & i ^ 2
Next i
End Sub
Private Sub Command2_Click()
End
End Sub
Private Function f1(n As Long) As Boolean
Dim j As Long,m As Long
m = Len(CStr(n))
For j = 1 To m / 2
If Mid(n,j,1) Mid(n,m - j + 1,1) Then Exit Function
Next j
f1 = True
End Function