Macro works in 2000 not XP for Progress Bar

F

Far

The Following macro works in Excel 2000 but not Excel XP
for showing the "progress %" of Marco Excecution.
Otherwise Macro runs but the visual form is not updated on
screen.

Note that if I dont unload" the Progress Bar it will show
100% complete as expected, but it does not show progress
while macro is executing

' Defines standard Footer & Header settings
Dim Counter As Integer
Dim Total_Worksheets As Integer
Total_Worksheets = Application.Worksheets.Count
Counter = 0
For Each wks In Worksheets
If wks.Visible = xlSheetVisible Then
wks.Rows("1:3").EntireRow.Hidden = True
End If
Counter = Counter + 1 ' Counter to display % done
in Progress Form
PctDone = Counter / (Total_Worksheets)
Call UpdateProgress(PctDone)
Next wks
Unload ProgressUpdate_Form
End Sub

' Procedure updates the "status Bar" on the
UpdateProgress form when Macro is executing to show %done
Sub UpdateProgress(pct)
With ProgressUpdate_Form
.FrameProgress.Caption = Format(pct, "0%")
.LabelProgress.Width = pct *
(.FrameProgress.Width - 10)
.Repaint
End With
End Sub

Thanks
 
Top