' ' ProgressBarTest.bas ' Illustrate how to use a progress bar for your applications ' that take a long time to run. ' ' Author: Tom mcCollough ' Organization: Engineering Geometry Systems ' Date: 8/9/02 ' Copyright (c) 2002, Engineering Geometry Systems ' ' Required FeatureCAM Version: 9.2.0.07 ' Public Sub ProgressBarTest Dim PB As FMProgressBar Dim i As Long Const range As Long = 10000 Set PB = Application.ShowProgressBar PB.Range = range PB.DialogTitle = PB.DialogTitle & " - My Little Test" PB.CancelAskText = "Stop the test?" For i = 1 To range PB.Text = i & " of " & range PB.Increment If PB.IsCanceled Then MsgBox "Test cancelled by user." ' when i go out of scope of PB, then the progress bar will go away Exit Sub End If Next i PB.Finished MsgBox "Successful test!" End Sub