Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a UserForm which runs some code for around 2 minutes. When the
CommandButton is activated I want a short message to display in a TextBox on the UserForm throughout the time the code is running. Even though 'TextBox1.Text = "selection running" is placed at the beginning the message does not appear until all the process has finished running. Grateful for any suggestions. -- Robert |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at DoEvents.
-- Bob Kilmer "Robert" wrote in message ... I have a UserForm which runs some code for around 2 minutes. When the CommandButton is activated I want a short message to display in a TextBox on the UserForm throughout the time the code is running. Even though 'TextBox1.Text = "selection running" is placed at the beginning the message does not appear until all the process has finished running. Grateful for any suggestions. -- Robert |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Robert,
One way is to use the Status Bar at the bottom of the screen. At various places within your code you can set different messages Application.StatusBar = "Code processing begun" Application.StatusBar = "2nd message" ...... Application.StatusBar = False ' this resets the Status Bar Or you can use an extra sheet with a message on it. In your code - show the window than use Application.ScreenUpdating = False to freeze the view (not the code). Set it back to True at the end of your code (and besure to hide the sheet. An alternate is to insert the sheet and than delete it. Or create another workbook with a message page and than close it without saving. use Application.DisplayAlerts = False ' reset to true at the end than close it without saving. Just a couple of ideas to work with. Post back if you want more input... -- sb "Robert" wrote in message ... I have a UserForm which runs some code for around 2 minutes. When the CommandButton is activated I want a short message to display in a TextBox on the UserForm throughout the time the code is running. Even though 'TextBox1.Text = "selection running" is placed at the beginning the message does not appear until all the process has finished running. Grateful for any suggestions. -- Robert |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In message , Robert writes
I have a UserForm which runs some code for around 2 minutes. When the CommandButton is activated I want a short message to display in a TextBox on the UserForm throughout the time the code is running. Even though 'TextBox1.Text = "selection running" is placed at the beginning the message does not appear until all the process has finished running. Grateful for any suggestions. Many thanks for the suggestions - DoEvents has solved the problem. -- Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
NEED A MACRO CODE TO USE IN A USERFORM | Excel Discussion (Misc queries) | |||
display userform | Excel Discussion (Misc queries) | |||
How can I make Excel display HTML code as text | Excel Discussion (Misc queries) | |||
Code to edit directly in cells from userform | Excel Programming | |||
Control code behavior with userform ? | Excel Programming |