Progress Bar
How about something simple like this:
Sub ShowProgressBar(lCounter As Long, _
lMax As Long, _
lInterval As Long, _
Optional lWidth As Long = 100, _
Optional strText As String)
Dim lStripes As Long
If lWidth = 0 Then
lWidth = 100
End If
If lCounter Mod lInterval = 0 Or lCounter = lMax Then
lStripes = Round((lCounter / lMax) * lWidth, 0)
DoEvents
Application.StatusBar = strText & _
String(lStripes, "|") & _
String(lWidth - lStripes, ".") & "|"
End If
End Sub
Sub test()
Dim i As Long
For i = 1 To 10000000
ShowProgressBar i, 10000000, 100000, , String(8, " ")
Next i
End Sub
RBS
"Paul W Smith" wrote in message
...
Is it possible to use a progress bar on a worksheet?
I have added the Microsoft ProgressBar Control version 6.0 to my Controls
list in Excel 2007. I can insert the control onto my worksheet but I can
find no way of controling it, or referencing it for that matter.
I am not interested in using the control bar on a userform, that would be
too easy and not waht my deliverable requires!
Paul Smith
|