Private Sub Form_Click()
Dim m As Integer
Dim strA As String
strA = 1
m = InputBox("输入一个整数")
If m = 1 Then
MsgBox m & "的所有因子:1," & m
Exit Sub
End If
For i = 2 To m
If m Mod i = 0 Then
strA = strA & "," & i
m = m / i
End If
Next i
MsgBox m & "的所有因子:" & strA & ","
End Su