Dim res, num1, cont As Double
Private Sub Command1_Click()
For cont = 0 To num1
res = res + cont
Text2.Text = res
Next
End Sub
Private Sub Command2_Click()
Text1.Text = " "
Text2.Text = " "
Text1.SetFocus
res = 0
num1 = 0
cont = 0
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Text1_Change()
If Text1.Text <> " " Then
num1 = Val(Text1.Text)
End If
End Sub
Private Sub Command1_Click()
For cont = 0 To num1
res = res + cont
Text2.Text = res
Next
End Sub
Private Sub Command2_Click()
Text1.Text = " "
Text2.Text = " "
Text1.SetFocus
res = 0
num1 = 0
cont = 0
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Text1_Change()
If Text1.Text <> " " Then
num1 = Val(Text1.Text)
End If
End Sub
No hay comentarios:
Publicar un comentario