Option Explicit
Private Sub Command1_Click()
List1.Clear
Dim N, x As Integer
N = Val(Text1.Text)
For x = 2 To N - 1
If N Mod x = 0 Then
List1.AddItem (x)
End If
Next
List1.AddItem (N)
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Text = "0"
List1.Clear
Text1.SetFocus
End Sub
Private Sub Command1_Click()
List1.Clear
Dim N, x As Integer
N = Val(Text1.Text)
For x = 2 To N - 1
If N Mod x = 0 Then
List1.AddItem (x)
End If
Next
List1.AddItem (N)
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Text = "0"
List1.Clear
Text1.SetFocus
End Sub
Publicar un comentario