philfer
12-31-2007, 12:43 PM
I am trying to use a UserForm to give the user a visual indicator that the macro is running but that it has a lot to do.
I use pctDone (dim as single) = counter/totalrows
Then userform.Show
With Userform
.frameProgress.Caption = Format (pctDone,"0%")
.labelProgress.Width = pctDone * . frameProgress.Width
End With
DoEvents
When I run the macro the UserForm appears but freezes. If I click the cross at the top right of the UserForm it does update but I cannot sit there and click it 2,000 times. Everything else is working fine as I did a Debug.Print on the pctDone and I can see the numbers running though to 1.
Is there a way to make VBA do the same as clicking on that cross/check at the top right of the UserForm
I use pctDone (dim as single) = counter/totalrows
Then userform.Show
With Userform
.frameProgress.Caption = Format (pctDone,"0%")
.labelProgress.Width = pctDone * . frameProgress.Width
End With
DoEvents
When I run the macro the UserForm appears but freezes. If I click the cross at the top right of the UserForm it does update but I cannot sit there and click it 2,000 times. Everything else is working fine as I did a Debug.Print on the pctDone and I can see the numbers running though to 1.
Is there a way to make VBA do the same as clicking on that cross/check at the top right of the UserForm