#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Refresh Userform

Hi,

I have a macro that runs through 1000 scenarios. There is a userform that I
update to display the progress. Basically it just shows the current scenario.

So the macro runs through the 1000 scenarios and each time it goes to the
next scenario it updates the Userform.

So the code says

UserForm1.Label1.Caption = CurrentScenario

The problem is that when the macro is running the userform is white and you
can't make out the Current Scenario. If I click ctrl-alt-delete and stop the
macro the userform has the correct scenario displayed but then when I start
it up again the number doesnt change. Is there some way to refresh the
userform?

Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Refresh Userform

I have two suggestions: make sure you have a DoEvents command before starting
the next scenario; and add a Repaint command to the userform after updating
the label caption (UserForm1.Repaint).

Hope this helps,

Hutch

"Jeff" wrote:

Hi,

I have a macro that runs through 1000 scenarios. There is a userform that I
update to display the progress. Basically it just shows the current scenario.

So the macro runs through the 1000 scenarios and each time it goes to the
next scenario it updates the Userform.

So the code says

UserForm1.Label1.Caption = CurrentScenario

The problem is that when the macro is running the userform is white and you
can't make out the Current Scenario. If I click ctrl-alt-delete and stop the
macro the userform has the correct scenario displayed but then when I start
it up again the number doesnt change. Is there some way to refresh the
userform?

Thanks for your help.

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
refresh a new worsheet on pivot table refresh [email protected] Excel Worksheet Functions 0 February 9th 07 07:39 PM
How can I 'Enable Automatic Refresh' for Query Refresh by default Anand Deshpande Setting up and Configuration of Excel 0 December 10th 06 04:47 AM
Query parameter "refresh when value changes" doesn't refresh - why Texas_Toast Excel Discussion (Misc queries) 0 January 4th 06 03:32 PM
Query Refresh-Enable Automatic Refresh Dialogue Box Terri Excel Discussion (Misc queries) 0 May 6th 05 08:21 PM
Userform with 5 textbox and 1 needs to refresh to have total funkymonkUK Excel Discussion (Misc queries) 1 February 17th 05 01:45 AM


All times are GMT +1. The time now is 11:04 AM.

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

About Us

"It's about Microsoft Excel"