Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Progress Bar Internet Connection
Hi all,
I am using Office 2003. I am trying to develop a routine with a Progress Bar that ping pongs until connection is made with the relevant URL. Once connection made and URL activated the StopFlag should be set to TRUE at which stage we exit the Ping Pong Progress bar and the application should continue with the rest of the code. How do I call and develop a Function for the StopFlag to show TRUE I have the following progress bar routine. Option Explicit Dim sngPercent As Single Dim StopFlag As Boolean Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Public Sub StartProgress() sngPercent = 0 'When starting the flag is set false StopFlag = False Do Until sngPercent = 100 'If StopFlag changes to true then exit sub If StopFlag = True Then sngPercent = 100 Exit Sub End If ProgressStyle sngPercent DoEvents sngPercent = sngPercent + 1 Sleep 100 ' This is what makes it all work going around continuously! If sngPercent = 100 Then sngPercent = 0 End If Loop End Sub Public Sub ProgressStyle(Percent As Single) Dim strTemp As String Dim intIndex As Integer intIndex = Int((Percent * 100) Mod (Len(WebProgressBar!Label2.Caption) + 1)) strTemp = String(Len(WebProgressBar!Label2.Caption), " ") If intIndex 0 Then Mid(strTemp, intIndex, 1) = "€¢" End If WebProgressBar!Label3.Caption = strTemp End Sub Many thanks/sgl |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Internet connection | Excel Discussion (Misc queries) | |||
Internet connection | Excel Discussion (Misc queries) | |||
Close Internet connection | Excel Programming | |||
Internet Connection | Excel Programming | |||
Internet connection? | Excel Programming |