kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
Code:
Call IntProgressBar
With Sheet2.Range("D7:D" & lr)
Set rngFind = .Find(what:=mySearch, After:=Sheet2.Range("D" & lr), _
LookIn:=xlValues, lookat:=xlWhole, searchdirection:=xlNext)
If Not rngFind Is Nothing Then
strFirstFind = rngFind.Address
Do
ListBox1.lstView.AddItem Trim(rngFind.Offset(, -2).Text)
For i = 1 To 137
ListBox1.lstView.List(ListBox1.lstView.ListCount - 1, i) = _
Trim(rngFind.Offset(, i - 2).Text)
‘ This is where I placed the progress code before, and I ran for a long time
Next i
Set rngFind = .FindNext(rngFind)
Dim currentProgress#, progressPercentage#, BarWidth&
currentProgress = i / 137
BarWidth = Progress.Border.Width * currentProgress
progressPercentage = Round(currentProgress * 100, 0)
Progress.Bar.Width = BarWidth
Progress.Text.Caption = progressPercentage & "% complete"
DoEvents
Loop While Not rngFind Is Nothing And rngFind.Address <> strFirstFind
End If
End With
Unload Progress
Hello,
I am here again – the challenge gets tougher and interesting. I am trying my skills on the progress bar and I got stacked with this one. I want to show the progress while each row of data is loaded or filtered. I don’t know what to write at where. Can someone pull me out?
Thanks in advance