urgente for contador
Publicado por lucy (8 intervenciones) el 24/09/2004 19:07:59
necesito muchisima ayuda, tengo 3 textbox, uno de valor inicial otro de valor final y otro donde me va a incrementar. has de cuenta en el primer textbox le ingreso un numero, en el segundo textbox le ingreso otro numero y en el tercer textbox le voy a poner el numero de veces que quiero que me incremente. es un contador. y esas tres cantidades me las tiene que pasar a una list. pero cuando ingreso cantidad no agrega las cantidads a la lista ayudenme por favor
yo le puse este codigo
Private Sub CmdAplicar_Click()
Dim resp As Integer
For resp = Text1.Text To Text2.Text Step Text3.Text
resp = List1.AddItem
Next
End Sub
y en cada texto le puse este codigo
Private Sub Text1_Change()
If Text1.Text <> Empty Then
If IsNumeric(Text1.Text) = False Then
MsgBox \"numeros\", vbCritical, \"Error\"
Text1.Text = 0
End If
End If
End Sub
Private Sub Text2_Change()
If Text2.Text <> Empty Then
If IsNumeric(Text2.Text) = False Then
MsgBox \"numeros\", vbCritical, \"error\"
Text2.Text = 0
End If
End If
End Sub
Private Sub Text3_Change()
If Text3.Text <> Empty Then
If IsNumeric(Text3.Text) = False Then
MsgBox \"numeros\", vbCritical, \"error\"
Text3.Text = 1
End If
End If
End Sub
ayudenme gracias.
yo le puse este codigo
Private Sub CmdAplicar_Click()
Dim resp As Integer
For resp = Text1.Text To Text2.Text Step Text3.Text
resp = List1.AddItem
Next
End Sub
y en cada texto le puse este codigo
Private Sub Text1_Change()
If Text1.Text <> Empty Then
If IsNumeric(Text1.Text) = False Then
MsgBox \"numeros\", vbCritical, \"Error\"
Text1.Text = 0
End If
End If
End Sub
Private Sub Text2_Change()
If Text2.Text <> Empty Then
If IsNumeric(Text2.Text) = False Then
MsgBox \"numeros\", vbCritical, \"error\"
Text2.Text = 0
End If
End If
End Sub
Private Sub Text3_Change()
If Text3.Text <> Empty Then
If IsNumeric(Text3.Text) = False Then
MsgBox \"numeros\", vbCritical, \"error\"
Text3.Text = 1
End If
End If
End Sub
ayudenme gracias.
Valora esta pregunta


0