I have a macro that runs through about 40,000 records which can be quite time consuming. I currently have a status bar that shows the percent of work complete, but I'd like to add something that shows an estimate of how much time is remaining and how much time has passed. Below is the first loop in my code that uses the progress bar. You'll see that I modified the progress bar to include "Label 2" which shows the current record of the total record count, I'd like to add "Label 3" to show something like "2:30 elapsed, 1:15 remaining".
Are there any suggestions for the best way to accomplish this? I'm using Excel 2010 on Windows 7 (64 bit). Thank you!
Are there any suggestions for the best way to accomplish this? I'm using Excel 2010 on Windows 7 (64 bit). Thank you!
HTML:
Sub IdentifyGS()
POData.Activate
For CurrentRow = 2 To LastRow
Combo = Cells(CurrentRow, ItemNumberColumn).Value & "-" & Len(Cells(CurrentRow, ItemNumberColumn))
Cells(CurrentRow, 5) = Application.VLookup(Combo, GSList.Columns("A:G"), 7, False)
DoEvents
PctDone = CurrentRow / LastRow
With UserForm2
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
.Label2.Caption = ("Record " & Format(CurrentRow - 1, "#,##0") & " of " & Format(LastRow - 1, "#,##0"))
End With
Next
Unload UserForm2
End Sub