View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron Michel Pierron is offline
external usenet poster
 
Posts: 214
Default Repaint causes form to flicker

Hi Chad;
You can try:
for count = 1 to activesheet.usedrange.rows.count
a=a+1
DoEvents
userform.label = format(a/count,"0%")
code...

MP

"Chad" a écrit dans le message de
...
I created a user form which has a calandar on it for the user to enter a

date and then click a button to run a macro. I also have a progress
indicator on it which displays the four or five steps the macro takes and
has a percentage next to it indicating how far along it is. I have
screenupdating off and use the repaint feature to update the percentage.
The problem is that the repaint causes the form to flicker a lot. Is there
a way around this?

The progress indicator may be a crude way of doing it:
for count = 1 to activesheet.usedrange.rows.count
a=a+1
userform.label = format(a/count,"0%")
userform.repaint
code...

I thought I might make a new form for the progress indication (currently

the progress indication is a part of the user form). Is there a better way
BESIDES the application.statusbar ? Thanks