Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=541471

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default TextBox Updating


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?


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=541471

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default TextBox Updating


The DoEvents did the trick nicely thankyou

--
grahamma
-----------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...fo&userid=2033
View this thread: http://www.excelforum.com/showthread.php?threadid=54147

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trendline Textbox Not Updating Phil Hageman Charts and Charting in Excel 5 September 27th 08 05:11 PM
updating spreadsheet from textbox David Goodall Excel Programming 0 October 11th 04 08:54 PM
textbox not updating when controlsource cell changes Christy Excel Programming 1 September 29th 04 02:39 AM
Textbox updating other Textboxes Thomas L[_2_] Excel Programming 1 July 7th 04 08:33 PM
Updating a textbox without erasing previous data nadir[_2_] Excel Programming 1 December 2nd 03 10:27 PM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"