title: ProgressBar not getting refresh in VBScript HTA
body: <p>I am showing a progress bar in the HTA file with VB Script code. This is working fine, with multiple click. Problem is that, its not getting refresh until any user interaction getting occur like message box or any error window. its not showing progress if i call it in single sub which is calling different functions.</p>
  
  <pre><code>&lt;Script Language="VBScript"&gt;
  '------------for Progress bar --------------
   Public w,x,y, MyTitle 
   w=100
   x=0
   y=100
   MyTitle = " _ Progress"
   '----------- w: bar width, x: done items, y: remaining items
  Sub test
      Progress(10)
       callsubA()
      Progress(10)
       callsubB()
      Progress(20)
      callsubC()
      Progress(10)
  End Sub
  
   Function Progress(step)
    x=x+step
    d = Round( x / (y/w) +1  ,0)
    document.Title = FormatPercent(x/y, 0) &amp; MyTitle
    document.all.ProgBarText.innerText = x &amp; "/" &amp; y
    document.all.ProgBarDone.innerText = String(d, "_")
     If d&lt;w Then
      document.all.ProgBarToDo.innerText = String(w-d, "_") &amp; "|"
     Else
      document.all.ProgBarToDo.innerText = "|"
     End If
      If x&gt;=y Then
      document.all.ProgBarToDo.innerText = ""
      MsgBox "Migration Completed"    
      x=0
      d = Round( x / (y/w) +1  ,0)
      document.Title = "Completed"
      document.all.ProgBarText.innerText = ""
      document.all.ProgBarDone.innerText = ""
     End If
   End Function 
  &lt;/script&gt;
  </code></pre>
  
  <p>and my HTML looks like :</p>
  
  <pre><code>    &lt;span id="ProgBarText"&gt;&lt;/span&gt;&lt;br&gt;
   &lt;span id="ProgBarDone" style="background-color: #3399FF"&gt;&lt;/span&gt;
   &lt;font color="#FFFFFF"&gt;
   &lt;span id="ProgBarToDo"style="background-color: #C0C0C0"&gt;&lt;/span&gt; 
   &lt;/font&gt; 
  </code></pre>
  
  <p>if i give msgbox after every sub, then it works fine....</p>