Refresh Userform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Back
Top