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