title: Label.Text doesn't change in a loop
body: <p>I'm trying to change a text that a label displays during each iteration of a Do While loop in Visual Basic. One label (which displays an integer) works fine, however the other stays blank until the loop finishes and displays the final result. What could be the problem?</p>
  
  <pre><code>Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  Handles btnOblicz.Click
  Dim W As Single
  Dim L As Integer
  Dim J As Integer
  Dim Y As Double
  
  W = Val(txtW.Text)
  
  L = InputBox("Input L")
  
  J = 0
  
  If W &gt; 0 And W &lt; 100 Then
  
  Do
  
      Y = (2 * Math.Sqrt(W)) / (L - J)
      J = J + 1
      lblJ.Text = Str(J)
      lblY.Text = Str(Y)
      MsgBox("Next...")
  
  Loop Until Y &lt; 0
  
  Else
      MsgBox("No calculations, because the number is less than zero or greater than a hundred.")
  
  End If
  
  End Sub
  </code></pre>