Hiding/Unhiding Labels

P

Paul DeWitt

I have a program function with 3 long steps.
I am trying to display the progress using labels and
unhiding the labels as the new step becomes active but the
progress is not displayed until the end. For Example,

lblStep1Start.Visible = true.
Me.Refresh.
' Perform work

lblStep1Finished.Visible = true.
Me.Refresh

When I do this, the labels are not shown until all the
functions have finished. How do I make the labels visible
as they finish.

Thanks
 
P

Paul Laska

Hi Paul,

You may want to try releasing the system in between large
portions of work, so it can perform the Refresh, by using
the 'DoEvents' function.

Hope that helps.

Paul Laska
 
M

Marshall Barton

Paul said:
I have a program function with 3 long steps.
I am trying to display the progress using labels and
unhiding the labels as the new step becomes active but the
progress is not displayed until the end. For Example,

lblStep1Start.Visible = true.
Me.Refresh.
' Perform work

lblStep1Finished.Visible = true.
Me.Refresh

When I do this, the labels are not shown until all the
functions have finished. How do I make the labels visible
as they finish.

Use Me.Repaint (possibly with a DoEvents) instead of
Refresh.
 

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