Refresh Userform

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top