S
StrandElectric
Making good progress with my UDT app, but loops are not behaving as
expected. Here's the code of my test program. Any SIMPLE comment on what I'm
doing wrong?
(Incidentally, I wonder why my copied and pasted code finishes up double
spaced?)
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
TestLabel.Text = "starting"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
For x = 1 To 500
Debug.Print(x) ' the iterations of the loop are shown correctly in the
immediate window
TestLabel.Text = x 'but the label is not updated and no number appears until
the end
Next x
End Sub
End Class
expected. Here's the code of my test program. Any SIMPLE comment on what I'm
doing wrong?
(Incidentally, I wonder why my copied and pasted code finishes up double
spaced?)
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
TestLabel.Text = "starting"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
For x = 1 To 500
Debug.Print(x) ' the iterations of the loop are shown correctly in the
immediate window
TestLabel.Text = x 'but the label is not updated and no number appears until
the end
Next x
End Sub
End Class