Sub PerformUpdate()
For lRow = 2 To lTotalRows
iPct = Round(lRow /lTotalRows* 100)'Divide current Row by total rows
UpdateProgress iPct
Next lRow
End Sub
Private Sub UpdateProgress(iPct As Integer)'update to progress bar form with the current % completed
frmBar.frame_Bar.Caption = frmBar.sProcedure & " - " & iPct & "% Complete"
frmBar.lblBar.Width = iPct * 2 'expands the bar by 2 points every %
DoEvents
End Sub