briprogram
MIS
I want the For Loop to display an answer on each line of the textbox but it never happens. Only the final answer shows up in the text box. What am I doing wrong?
--------------------------
Thanks
Brian
Code:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'Dim counter As Integer
Dim factorial As Long = 1
For counter As Integer = 1 To 20
factorial *= counter
Label1.Text = Convert.ToString(counter) & vbCrLf
Label2.text = Convert.ToString(factorial) & vbCrLf
Next
End Sub
End Class
--------------------------
Thanks
Brian