Refreshing a form?


Posted by Cory on August 20, 2001 1:26 PM

I have a form with a start button. underneath the start button i have a couple dozen tiny labels in a row right next to each other. When I press the start button, a macro starts that does a bunch of cut, copy, pasting, etc. to an underlying workbook. Laced throughout the macro code are lines that change the backcolor property of my tiny labels from null to blue, one at a time (simulating a progress meter for the running macro).

My problem:
the form doesn't show the changing backcolors for my tiny labels until there's a break in the code (a message box, for example) or until the code finishes executing. there's only one msgbox in the middle of the code, so the 'progress meter' looks like it's going in two big chunks instead of 'progressing'...

is there a way to display the changing backcolor properties as the macro is running? I've tried to find a refresh property or some such but to no luck...

Any help would be greatly appreciated...

Cory

Posted by faster on August 20, 2001 4:00 PM

Cory:

Where ever your form labels are changed try inserting
this code.

Me.Repaint


You may need to substitute the form's
name in place of the Me keyword; depending on your
code.

Posted by Cory on August 21, 2001 7:44 AM

faster! Just when I begin to think my question's been abandoned to the vast ocean of unanswered queries, you come in and save the day! again...! many thanks...

Cory



Posted by faster on August 22, 2001 11:44 AM

You bet. Kind of a cool problem, so I thought I
would give it a shot. Below is another way to
give users status.

Application.StatusBar = "Status Bar Test"

Just make sure you clear it in the end.
Application.StatusBar = ""