M
Michael Wise
I'm wanting to use ROBIN HAMMOND's progress bar code bit i'm havin
difficulty understanding where my portion of the code should be
Senerio: I am initiating a file search in which during this time
would like to notify the user via a big visual that there is progres
going on. There is no set time from for this to all take place it
varies dependent on how many files are on the server that that time. M
assumption for those familiar with Robin's code is that my code would b
in the mDemo module somewhere. I have pasted Robin's mDemo code here a
well as the code I need initiated. Any help here would be a tremendou
help. TIA
ROBIN HAMMOND's Code:
Sub ProgBarDemo()
Dim PB As clsProgBar
Dim nCounter As Integer
Dim lWaitCount As Long
Set PB = New clsProgBar
With PB
.Title = "Progress Bar"
.Caption2 = "Please do not open any other Excel applications"
.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
My Code I need to gage on:
Sub Wait()
Wait:
usid = ActiveSheet.Range("D8")
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
With Application.FileSearch
.NewSearch
.LookIn = "\\txnt34\g-tx-virtual"
.TextOrProperty = "EQSERVICEMAC"
.MatchTextExactly = False
.Filename = "*.txt"
.Execute
For i = 1 To .FoundFiles.Count
If .FoundFiles.Count = 0 Then GoTo Wait Else
Workbooks.Open .FoundFiles(i)
Next i
End Wit
difficulty understanding where my portion of the code should be
Senerio: I am initiating a file search in which during this time
would like to notify the user via a big visual that there is progres
going on. There is no set time from for this to all take place it
varies dependent on how many files are on the server that that time. M
assumption for those familiar with Robin's code is that my code would b
in the mDemo module somewhere. I have pasted Robin's mDemo code here a
well as the code I need initiated. Any help here would be a tremendou
help. TIA
ROBIN HAMMOND's Code:
Sub ProgBarDemo()
Dim PB As clsProgBar
Dim nCounter As Integer
Dim lWaitCount As Long
Set PB = New clsProgBar
With PB
.Title = "Progress Bar"
.Caption2 = "Please do not open any other Excel applications"
.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
My Code I need to gage on:
Sub Wait()
Wait:
usid = ActiveSheet.Range("D8")
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
With Application.FileSearch
.NewSearch
.LookIn = "\\txnt34\g-tx-virtual"
.TextOrProperty = "EQSERVICEMAC"
.MatchTextExactly = False
.Filename = "*.txt"
.Execute
For i = 1 To .FoundFiles.Count
If .FoundFiles.Count = 0 Then GoTo Wait Else
Workbooks.Open .FoundFiles(i)
Next i
End Wit