VB 2010 For..Next Help Request
Well as my homework i had to investigate about the instruction For....Next and then make a basic program witch im having a hard time finding information about how to even do it.
I Know that For....Next is used to do a instruction a selected amount of times .
I'm trying to make a basic program on VS 2010 With only 1 txtbox (I'm trying to use For ..Next to have to type on the same txtbox 3 times without having to add more boxes i don't know if it possible :C , but how i tryed it , it ends up doing the amount of turns i gived but without even giving me the ability to type on the txtbox again i type 1 time and it finished and when i add a MsgBox it ends up poping 3 of them without leting me type.
I Know that For....Next is used to do a instruction a selected amount of times .
I'm trying to make a basic program on VS 2010 With only 1 txtbox (I'm trying to use For ..Next to have to type on the same txtbox 3 times without having to add more boxes i don't know if it possible :C , but how i tryed it , it ends up doing the amount of turns i gived but without even giving me the ability to type on the txtbox again i type 1 time and it finished and when i add a MsgBox it ends up poping 3 of them without leting me type.
Dim Contador As Integer
Dim SM9 As Double
Dim SIM As Double
For Contador = 1 To 3
Next
If Val(txtn.Text) Mod 9 = 0 Then
SM9 = SM9 + Val(txtn.Text)
End If
If Val(txtn.Text) Mod 2 = 0 = False Then
SIM = SIM + Val(txtn.Text)
End If
txtn.Text = String.Empty
lblsim.Text = SIM
lblsumam9.Text = SM9
I have changed the spot of the code multiple times :C
Dim SM9 As Double
Dim SIM As Double
For Contador = 1 To 3
Next
If Val(txtn.Text) Mod 9 = 0 Then
SM9 = SM9 + Val(txtn.Text)
End If
If Val(txtn.Text) Mod 2 = 0 = False Then
SIM = SIM + Val(txtn.Text)
End If
txtn.Text = String.Empty
lblsim.Text = SIM
lblsumam9.Text = SM9
I have changed the spot of the code multiple times :C
