Updated Modeless Progress Bar Class Available

R

Robin Hammond

If anyone is interested, following up on a previous post there's an updated
version of a progress bar class up on my site. The updates now allow it to
run in Excel 97 as well as later versions (by using the status bar rather
than a modeless form if needed) meaning that the developer doesn't have to
worry about anything other than 95 users. The demo also shows how to handle
a cancel during execution of a routine.

In brief, it displays the usual progress bar, a form title, up to three
captions, and an optional cancel button. Typical usage is shown below.
Hopefully it will help somebody...
Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


Public UserCancelled As Boolean

Sub ProgBarDemo()
Dim PB As clsProgBar
Dim nCounter As Integer
Dim lWaitCount As Long

Set PB = New clsProgBar
With PB
.Title = "Enhanced Datasystems Progress Bar"
.Caption2 = "This is caption 2"
.Caption3 = "This is caption 3"
.Show
For nCounter = 0 To 100
.Progress = nCounter
.Caption1 = "Progress message " & CStr(nCounter)
For lWaitCount = 0 To 1000000
If UserCancelled = True Then GoTo EndRoutine
Next lWaitCount
Next nCounter
EndRoutine:
.Finish
End With
Set PB = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top