If a Loop is very long (lasts more than 10 seconds or so) the program just stops responding and I have to use ctrl-alt-delete. Also, while the Loop is running, I can't use my computer until it either finishes or until it stops responding. How do I get my program to not work so hard?
VB Code:
  1. Dim lASDF As Long
  2.  
  3. Private Sub Form_Load()
  4. End Sub
  5.  
  6. Private Sub cmndStart_Click()
  7.  
  8.     lASDF = 0
  9.  
  10.     Do
  11.         lASDF = lASDF + 1
  12.         lblCount.Caption = lASDF
  13.     Loop Until (1 = 2)
  14.  
  15. End Sub
If the Loop condition is 'Until (lASDF = 1000000)' it will take about nine seconds to finish. Looping a million times isn't enough to freeze the program, but during the time it takes I can't do anything on my computer. Not even view my desktop.