Results 1 to 2 of 2

Thread: Updating Textbox

  1. #1

    Thread Starter
    Hyperactive Member Art W.'s Avatar
    Join Date
    Apr 2002
    Location
    In My Own Little World, But that’s OK because they know me there!
    Posts
    271

    Updating Textbox

    Hello everyone:

    I am trying to update a textbox before the program has finished running. If you have a counter (z +=1) how to you get it to display each number to display before the program finishes running?

    Is there something else I should use instead?

    Thanks

    Art
    SLEEP: A Totally Inadequate Substation For Caffeine!

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Updating Textbox

    Application.DoEvents() will allow the program to process other events within a closed loop.

    Code:
    For z = 0 To 1000
       TextBox1.Text = z.ToString()
       Application.DoEvents()
    Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width