你的问题不全,下面程序找的是1000以内的完全数。
Private Sub Command1_Click()
Dim i As Integer, s As Integer
For i = 2 To 1000
s = 0
For j = 1 To i - 1
If i Mod j = 0 Then s = s + j
Next
If s = i Then Print i,
Next
End Sub
多给点例子 我数学不好 我弄明白这个应该不难写