Hi, I have a userform called Progress which has a frame named Border, a label named Bar and another label called Text.
With this userform I would like to add time elapsed and possible time remaining?
In this thread time elapsed and time remaining is calculated, however, I can't modify it to work with my code since I don't understand the code.
https://www.mrexcel.com/forum/excel-questions/653806-progress-bar-countdown-timer-elapsed-time.html
With this userform I would like to add time elapsed and possible time remaining?
In this thread time elapsed and time remaining is calculated, however, I can't modify it to work with my code since I don't understand the code.
https://www.mrexcel.com/forum/excel-questions/653806-progress-bar-countdown-timer-elapsed-time.html
Code:
Sub Progressbar()
Dim CurrentProgress As Double
Dim ProgressPercentage As Double
Dim BarWidth As Long
Call InitProgressBar
CurrentProgress = L / 1600
BarWidth = Progress.BorderColor.Width * CurrentProgress
ProgressPercentage = Round(CurrentProgress * 100, 0)
Progress.Bar.Width = BarWidth
Progress.Text.Caption = ProgressPercentage & "% Complete"
DoEvents
End Sub
Code:
Sub InitProgressBar()
With Progress
.Bar.Width = 0
.Text.Caption = "0% Complete"
.Show vbModeless
End With
End Sub