+ Reply to Thread
Results 1 to 5 of 5

TextBox Updating

  1. #1
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    TextBox Updating

    Private Sub CommandButton15_Click()
    Sheets("Column Sort").Range("A2", "N3340") = ""
    For a = 1 To 1000
    b = Int(a / 10)
    Sheets("Column Sort").Range("O1") = b
    TextBox2 = Sheets("Column Sort").Range("O1")
    Sheets("Column Sort").Range("A3340:N3340").Copy_ Destination:=Sheets("Column Sort").Range("A" & a)
    Next a
    End Sub

    What I want is for TextBox2 to show the variable 'a' as a percentage done.
    Although the macro works, it only updates TextBox2 when it has finished.
    ie TextBox2 shows 100.
    How can I get TextBox2 to update as it runs through the macro, which should show 1 thru to 100.

    Am using Excel97 if it makes a difference.

  2. #2

    Re: TextBox Updating

    I would do away with the text box - use

    application.statusbar = "whatever you want as a string"

    to update the message

    when finished, application.statusbar=""


  3. #3
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    Progress Bar

    I see what your getting at but as all the rest of the data diplayed is on the UserForm I have created, I wanted the progress to be on the Form as well. (Looks nice)

    Any ideas?

  4. #4

    Re: TextBox Updating

    Try putting a DoEvents statement just before the NEXT statement - I've
    just run some sample code at this end and it appears to work ok


  5. #5
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    TextBox updating

    The DoEvents did the trick nicely thankyou.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1