Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
sgl sgl is offline
external usenet poster
 
Posts: 80
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet connection stuenov Excel Discussion (Misc queries) 0 February 22nd 09 07:25 PM
Internet connection stuenov Excel Discussion (Misc queries) 0 February 18th 09 03:52 PM
Close Internet connection donbowyer Excel Programming 4 November 9th 05 02:04 PM
Internet Connection Web_Builder[_2_] Excel Programming 2 August 11th 04 01:07 AM
Internet connection? Francis Ang Excel Programming 3 May 31st 04 04:01 AM


All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"