Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Watchdog timer issues

I am using XL 2003.

I have a need to run Internet Explorer for about 20k URLs.
This is beyond the capacity of IE on my system.
I use a 30 second watchdog timer to detect IE becoming unreasonably slow.

Relevant code is:

' Needs Tools/References/Microsoft Internet Controls
Public ie As SHDocVw.InternetExplorer

Private killtime As Date
Private Const killduration As String = "00:00:30"
....
Private Sub kill_ie()
Debug.Print now & " kill_ie() called"
killtime = 0
Set ie = Nothing
End Sub

Public Function Wait4IEretry(ByVal operation As String) As Boolean
....

On Error GoTo newie
....
killtime = now + TimeValue(killduration)
Application.OnTime EarliestTime:=killtime, Procedu="kill_ie", Schedule:=True
Wait4IE operation
Application.OnTime EarliestTime:=killtime, Procedu="kill_ie", Schedule:=False

If False Then
newie:
If killtime < 0 Then
On Error Resume Next ' ontime may not be set
Application.OnTime EarliestTime:=killtime, Procedu="kill_ie", Schedule:=False
End If

Set ie = Nothing
Resume retry
Stop
retry:
' Stop
Wait4IEretry = False
Exit Function
End If
....
Wait4IEretry = True
Exit Function
.....
End Function

So Wait4IEretry starts a 3o second watchdog timer on Wait4IE completing
in 30 seconds.

If 30 seconds elapses, kill_ie is called and ie is made nothing, causing
Wait4IE to complete with an error and transfer control to label newie.
I find "On Error Resume Next" ineffective against errors in Application.OnTime.
I zero killtime in kill_ie so Application.OnTime is not called.
If I hit escape to allow me to save my XL file, Application.OnTime is called and errors.
Why is "On Error Resume Next" ineffective?

If 30 seconds does not elapse, the timer is cancelled without problem.

I can't work out how to make killduration a date.
In the immediate debug window, I see
?#00:00:30#
00:00:30
?timevalue("00:00:30")
00:00:30

In the debug code window,
Private Const killduration As Date = #00:00:30#
is transformed into
Private Const killduration As Date = #12:00:30 AM#

As an sside, many cells in my worksheet have a small triangle marking
their upper left corner. I remember that as meaning there is some
strangeness about the data in the marked cells. I just can't
work out how to Google it.
excel cell warning message is ineffective.
excel cell triangle corner suggests a formula error and that a trace
error button should appear - it does not - the cells contain values.
Unsetting Tools/Options/Error checking/Number stored as text
causes those triangles to vanish and I now know what the issue is.
How to I get "Number stored as text" to appear as a warning?
--
Walter Briscoe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Watchdog timer issues

Walter,

Try...

Private Const vKillET = "00:00:30"

...and in your function...

killtime = TimeValue(Now) + TimeValue(vKill_ET)
'returns time in hh:mm:ss AM/PM

Also, in your function you might want to def a var to hold the boolean
value used in your If..Then block. It can be set True as a default
unless a condition toggles it false...

Dim bMyVar As Boolean
bMyVar = True '//assume success

'//some code that preserves or toggles bMyVar

If Not bMyVar Then
newie:
...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Watchdog timer issues

In message of Sat, 29 Oct 2016 17:50:33 in
microsoft.public.excel.programming, GS writes
Gary,
Thanks for your input.

Walter,

Try...

Private Const vKillET = "00:00:30"


That is effectively what I do in
Private Const killduration As String = "00:00:30"

I don't do Magyar. ;)

I feel I should be able to do
Private Const vKillET as date = sommething.


..and in your function...

killtime = TimeValue(Now) + TimeValue(vKill_ET)
'returns time in hh:mm:ss AM/PM


I do that partially with
killtime = now + TimeValue(killduration)


Why would you "cast" now?
?typename(now)
Date
?typename(timevalue(now))
Date


Also, in your function you might want to def a var to hold the boolean
value used in your If..Then block. It can be set True as a default
unless a condition toggles it false...

Dim bMyVar As Boolean
bMyVar = True '//assume success

'//some code that preserves or toggles bMyVar

If Not bMyVar Then
newie:
...


I must concede I am overloading killtime as both a value and a flag.
Slightly insanitary. ;)

How do I turn green cell north west corners into text?
--
Walter Briscoe
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Watchdog timer issues

Not sure why you're automating IE since most things it does can be
accessed directly via APIs with no wait time!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Watchdog timer issues

In message of Sat, 29 Oct 2016 17:52:09 in
microsoft.public.excel.programming, GS writes
Not sure why you're automating IE since most things it does can be
accessed directly via APIs with no wait time!


Gary, I know no better.
What APIs do you refer to?
I send a URL, await a response and analyse ie.doc.
I repeat, I know no better. ;)
--
Walter Briscoe


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Watchdog timer issues

In message of Sat, 29 Oct 2016 17:52:09
in microsoft.public.excel.programming, GS writes
Not sure why you're automating IE since most things it does can be
accessed directly via APIs with no wait time!


Gary, I know no better.
What APIs do you refer to?
I send a URL, await a response and analyse ie.doc.
I repeat, I know no better. ;)


Have a look at my replies to the post by Robert Baer in this forum on
May 26th to see if it applies to what you are trying to do...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Watchdog timer issues

In message of Sat, 29 Oct 2016
17:52:09 in microsoft.public.excel.programming, GS
writes
Not sure why you're automating IE since most things it does can be
accessed directly via APIs with no wait time!


Gary, I know no better.
What APIs do you refer to?
I send a URL, await a response and analyse ie.doc.
I repeat, I know no better. ;)


Have a look at my replies to the post by Robert Baer in this forum on
May 26th to see if it applies to what you are trying to do...


Subject of his post is...

"Read (and parse) file on the web"

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Watchdog timer issues

In message of Sun, 30 Oct 2016 17:36:45 in
microsoft.public.excel.programming, GS writes
In message of Sat, 29 Oct 2016
17:52:09 in microsoft.public.excel.programming, GS
writes
Not sure why you're automating IE since most things it does can be
accessed directly via APIs with no wait time!


Gary, I know no better.
What APIs do you refer to?
I send a URL, await a response and analyse ie.doc.
I repeat, I know no better. ;)


Have a look at my replies to the post by Robert Baer in this forum on
May 26th to see if it applies to what you are trying to do...


Subject of his post is...

"Read (and parse) file on the web"


Thanks!
I had a look at your contributions to this 92 member thread.
I saw 2 interesting "names": URLDownloadToFile and fParseWebPages.frm.
I googled URLDownloadToFile.
I adapted a web example. (I later found an example from Auric in the
thread.)
When I opened the downloaded page in IE, it looked different - simpler.
I made another example, which downloaded to memory. The download was
about 120k, compared with 110k.
I converted that example to write to a file. The file was similarly
simpler.
I would like an API technique to convert the downloaded HTML to DOM.
I have a reliable - but slow - method for analysing DOM information.
While Googling, I learned Regular Expressions are not recommended for
HTML analysis.

I also grabbed ParseWebPages.zip from https://www.nsncenter.com/NSN/.
When I ran the code, I got "Method or data member not found" referring
to webbrowser in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("PgNum") Then
Range("WebAddr") = gsUrl1 & Target.Value: Me.WebBrowser1.Navigate
Range("WebAddr"): SetBtnState
End If
End Sub

I found no "Me" definition.

My understanding is zilch, but I am happy to learn.

OOPS! I nearly forgot to quote my example code:

Public Declare Function URLDownloadToFile Lib "urlmon" Alias
"URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As
String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long

Private Function GetWebPage(ByRef URL As String) As String
Dim xml As Object ' need reference to get IXMLHTTPRequest
On Error Resume Next
Set xml = CreateObject("Microsoft.XMLHTTP")
With xml
.Open "GET", URL, False
.send
GetWebPage = .responseText
End With
Set xml = Nothing ' Is this needed?
End Function

Public Function DownloadFile1() As String
Dim lngRetVal As Long
Dim hFile As Long
Dim localFilename As String
Dim strCurrentURL As String
Dim content As String

localFilename = "C:\Users\IBM\AppData\Roaming\Microsoft\Excel\Down lo
ad.htm"
strCurrentURL = "https://tfl.gov.uk/bus/stop/490000235Z/new-oxford-
street?"
If True Then
content = GetWebPage(strCurrentURL)
hFile = FreeFile
Open localFilename For Output As #hFile
Write #hFile, content
Close #hFile
Else
lngRetVal = URLDownloadToFile(0, strCurrentURL, localFilename, 0, 0)
End If
hFile = FreeFile
Open localFilename For Input As #hFile
DownloadFile1 = Input$(LOF(hFile), hFile)
Close #hFile
End Function

Public Function DownloadFile0() As String
Dim lngRetVal As Long
Dim hFile As Long
Dim localFilename As String
Dim strCurrentURL As String

localFilename = "C:\Users\IBM\AppData\Roaming\Microsoft\Excel\Down lo
ad.htm"
strCurrentURL = "https://tfl.gov.uk/bus/stop/490000235Z/new-oxford-
street?"
lngRetVal = URLDownloadToFile(0, strCurrentURL, localFilename, 0, 0)
hFile = FreeFile
Open localFilename For Input As #hFile
DownloadFile = Input$(LOF(hFile), hFile)
Close #hFile
End Function

--
Walter Briscoe
  #9   Report Post  
Banned
 
Posts: 8
Default

Quote:
Originally Posted by Walter Briscoe View Post
I am using XL 2003. I have a need to run Internet Explorer for about 20k URLs. This is beyond the capacity of IE on my system. I use a 30 second watchdog timer to detect IE becoming unreasonably slow. Relevant code is: ' Needs Tools/References/Microsoft Internet Controls Public ie As SHDocVw.InternetExplorer Private killtime As Date Private Const killduration As String = &quot;00:00:30&quot; .... Private Sub kill_ie() Debug.Print now &amp; &quot; kill_ie() called&quot; killtime = 0 Set ie = Nothing End Sub Public Function Wait4IEretry(ByVal operation As String) As Boolean .... On Error GoTo newie .... killtime = now + TimeValue(killduration) Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=True Wait4IE operation Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False If False Then newie: If killtime &lt;&gt; 0 Then On Error Resume Next ' ontime may not be set Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False End If Set ie = Nothing Resume retry Stop retry: ' Stop Wait4IEretry = False Exit Function End If .... Wait4IEretry = True Exit Function ..... End Function So Wait4IEretry starts a 3o second watchdog timer on Wait4IE completing in 30 seconds. If 30 seconds elapses, kill_ie is called and ie is made nothing, causing Wait4IE to complete with an error and transfer control to label newie. I find &quot;On Error Resume Next&quot; ineffective against errors in Application.OnTime. I zero killtime in kill_ie so Application.OnTime is not called. If I hit escape to allow me to save my XL file, Application.OnTime is called and errors. Why is &quot;On Error Resume Next&quot; ineffective? If 30 seconds does not elapse, the timer is cancelled without problem. I can't work out how to make killduration a date. In the immediate debug window, I see ?#00:00:30# 00:00:30 ?timevalue(&quot;00:00:30&quot;) 00:00:30 In the debug code window, Private Const killduration As Date = #00:00:30# is transformed into Private Const killduration As Date = #12:00:30 AM# As an sside, many cells in my worksheet have a small triangle marking their upper left corner. I remember that as meaning there is some strangeness about the data in the marked cells. I just can't work out how to Google it. excel cell warning message is ineffective. excel cell triangle corner suggests a formula error and that a trace error button should appear - it does not - the cells contain values. Unsetting Tools/Options/Error checking/Number stored as text causes those triangles to vanish and I now know what the issue is. How to I get &quot;Number stored as text&quot; to appear as a warning? -- Walter Briscoe
Xin lỗi th*y cô đã luôn quan tâm v* dạy tôi những điều hay lẽ phải, dạy tôi những thứ không 1 admin n*o có thể dạy em như: sống trên đời phải biết bao dung, nhân loại với nhau không nên thanh lọc lẫn nhau, copy v* paste l* 2 th*nh tựu khoa học h*ng đầu thế giới v* được các chuyên gia h*ng đầu về tin học tin dùng.
  #10   Report Post  
Banned
 
Posts: 8
Default

Quote:
Originally Posted by Walter Briscoe View Post
I am using XL 2003. I have a need to run Internet Explorer for about 20k URLs. This is beyond the capacity of IE on my system. I use a 30 second watchdog timer to detect IE becoming unreasonably slow. Relevant code is: ' Needs Tools/References/Microsoft Internet Controls Public ie As SHDocVw.InternetExplorer Private killtime As Date Private Const killduration As String = &quot;00:00:30&quot; .... Private Sub kill_ie() Debug.Print now &amp; &quot; kill_ie() called&quot; killtime = 0 Set ie = Nothing End Sub Public Function Wait4IEretry(ByVal operation As String) As Boolean .... On Error GoTo newie .... killtime = now + TimeValue(killduration) Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=True Wait4IE operation Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False If False Then newie: If killtime &lt;&gt; 0 Then On Error Resume Next ' ontime may not be set Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False End If Set ie = Nothing Resume retry Stop retry: ' Stop Wait4IEretry = False Exit Function End If .... Wait4IEretry = True Exit Function ..... End Function So Wait4IEretry starts a 3o second watchdog timer on Wait4IE completing in 30 seconds. If 30 seconds elapses, kill_ie is called and ie is made nothing, causing Wait4IE to complete with an error and transfer control to label newie. I find &quot;On Error Resume Next&quot; ineffective against errors in Application.OnTime. I zero killtime in kill_ie so Application.OnTime is not called. If I hit escape to allow me to save my XL file, Application.OnTime is called and errors. Why is &quot;On Error Resume Next&quot; ineffective? If 30 seconds does not elapse, the timer is cancelled without problem. I can't work out how to make killduration a date. In the immediate debug window, I see ?#00:00:30# 00:00:30 ?timevalue(&quot;00:00:30&quot;) 00:00:30 In the debug code window, Private Const killduration As Date = #00:00:30# is transformed into Private Const killduration As Date = #12:00:30 AM# As an sside, many cells in my worksheet have a small triangle marking their upper left corner. I remember that as meaning there is some strangeness about the data in the marked cells. I just can't work out how to Google it. excel cell warning message is ineffective. excel cell triangle corner suggests a formula error and that a trace error button should appear - it does not - the cells contain values. Unsetting Tools/Options/Error checking/Number stored as text causes those triangles to vanish and I now know what the issue is. How to I get &quot;Number stored as text&quot; to appear as a warning? -- Walter Briscoe
Mới gọi lên nh* mạng hỏi mạng hôm nay bị cái éo gì ấy, đăng stt facebook cả mấy tiếng rồi ko thấy ai like


  #11   Report Post  
Banned
 
Posts: 8
Default

Quote:
Originally Posted by Walter Briscoe View Post
I am using XL 2003. I have a need to run Internet Explorer for about 20k URLs. This is beyond the capacity of IE on my system. I use a 30 second watchdog timer to detect IE becoming unreasonably slow. Relevant code is: ' Needs Tools/References/Microsoft Internet Controls Public ie As SHDocVw.InternetExplorer Private killtime As Date Private Const killduration As String = &quot;00:00:30&quot; .... Private Sub kill_ie() Debug.Print now &amp; &quot; kill_ie() called&quot; killtime = 0 Set ie = Nothing End Sub Public Function Wait4IEretry(ByVal operation As String) As Boolean .... On Error GoTo newie .... killtime = now + TimeValue(killduration) Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=True Wait4IE operation Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False If False Then newie: If killtime &lt;&gt; 0 Then On Error Resume Next ' ontime may not be set Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False End If Set ie = Nothing Resume retry Stop retry: ' Stop Wait4IEretry = False Exit Function End If .... Wait4IEretry = True Exit Function ..... End Function So Wait4IEretry starts a 3o second watchdog timer on Wait4IE completing in 30 seconds. If 30 seconds elapses, kill_ie is called and ie is made nothing, causing Wait4IE to complete with an error and transfer control to label newie. I find &quot;On Error Resume Next&quot; ineffective against errors in Application.OnTime. I zero killtime in kill_ie so Application.OnTime is not called. If I hit escape to allow me to save my XL file, Application.OnTime is called and errors. Why is &quot;On Error Resume Next&quot; ineffective? If 30 seconds does not elapse, the timer is cancelled without problem. I can't work out how to make killduration a date. In the immediate debug window, I see ?#00:00:30# 00:00:30 ?timevalue(&quot;00:00:30&quot;) 00:00:30 In the debug code window, Private Const killduration As Date = #00:00:30# is transformed into Private Const killduration As Date = #12:00:30 AM# As an sside, many cells in my worksheet have a small triangle marking their upper left corner. I remember that as meaning there is some strangeness about the data in the marked cells. I just can't work out how to Google it. excel cell warning message is ineffective. excel cell triangle corner suggests a formula error and that a trace error button should appear - it does not - the cells contain values. Unsetting Tools/Options/Error checking/Number stored as text causes those triangles to vanish and I now know what the issue is. How to I get &quot;Number stored as text&quot; to appear as a warning? -- Walter Briscoe
Được l*m cmt đầu tiên tôi cảm thấy rất l* hạnh phúc v* rất l* hồi hộp.
  #12   Report Post  
Banned
 
Posts: 8
Default

Quote:
Originally Posted by Walter Briscoe View Post
I am using XL 2003. I have a need to run Internet Explorer for about 20k URLs. This is beyond the capacity of IE on my system. I use a 30 second watchdog timer to detect IE becoming unreasonably slow. Relevant code is: ' Needs Tools/References/Microsoft Internet Controls Public ie As SHDocVw.InternetExplorer Private killtime As Date Private Const killduration As String = &quot;00:00:30&quot; .... Private Sub kill_ie() Debug.Print now &amp; &quot; kill_ie() called&quot; killtime = 0 Set ie = Nothing End Sub Public Function Wait4IEretry(ByVal operation As String) As Boolean .... On Error GoTo newie .... killtime = now + TimeValue(killduration) Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=True Wait4IE operation Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False If False Then newie: If killtime &lt;&gt; 0 Then On Error Resume Next ' ontime may not be set Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False End If Set ie = Nothing Resume retry Stop retry: ' Stop Wait4IEretry = False Exit Function End If .... Wait4IEretry = True Exit Function ..... End Function So Wait4IEretry starts a 3o second watchdog timer on Wait4IE completing in 30 seconds. If 30 seconds elapses, kill_ie is called and ie is made nothing, causing Wait4IE to complete with an error and transfer control to label newie. I find &quot;On Error Resume Next&quot; ineffective against errors in Application.OnTime. I zero killtime in kill_ie so Application.OnTime is not called. If I hit escape to allow me to save my XL file, Application.OnTime is called and errors. Why is &quot;On Error Resume Next&quot; ineffective? If 30 seconds does not elapse, the timer is cancelled without problem. I can't work out how to make killduration a date. In the immediate debug window, I see ?#00:00:30# 00:00:30 ?timevalue(&quot;00:00:30&quot;) 00:00:30 In the debug code window, Private Const killduration As Date = #00:00:30# is transformed into Private Const killduration As Date = #12:00:30 AM# As an sside, many cells in my worksheet have a small triangle marking their upper left corner. I remember that as meaning there is some strangeness about the data in the marked cells. I just can't work out how to Google it. excel cell warning message is ineffective. excel cell triangle corner suggests a formula error and that a trace error button should appear - it does not - the cells contain values. Unsetting Tools/Options/Error checking/Number stored as text causes those triangles to vanish and I now know what the issue is. How to I get &quot;Number stored as text&quot; to appear as a warning? -- Walter Briscoe
Ta từng nghĩ mình l* thiên hạ vô song, bao năm lăn lội chốn giang hồ, công phu phun gió phóng bão tưởng chừng không tìm ra đối thủ. Thế m* th*t không ngờ, mới rữa tay gác kiếm chưa lâu thì chốn giang hồ kia lại d*y lên bao tay cao thủ, miệng dẽo mỏ d*i lưỡi loe loa, quả l* ghê gớm thay!. Đỉnh Côn Lôn chót vót phủ mây kia tưởng rằng l* cao nhất, leo lên tới rồi mới biết ê vơ rét còn cao hơn!, ngẫm chốn giang hồ cũng th*t b* hiểm, các cao nhân dị lão như ngọa hổ t*ng long, quả th*t vê lờ, vê lờ !
  #13   Report Post  
Banned
 
Posts: 8
Default

What's Going down i am new to this, I stumbled upon this I have discovered It positively helpful and it has helped me out loads. I'm hoping to give a contribution & aid other users like its aided me. Good job.
  #14   Report Post  
Banned
 
Posts: 8
Default

I'm still learning from you, while I'm trying to reach my goals. I certainly liked reading all that is written on your blog.Keep the stories coming. I enjoyed it!
  #15   Report Post  
Banned
 
Posts: 8
Default

I'd forever want to be update on new blog posts on this internet site, saved to my bookmarks!


  #16   Report Post  
Banned
 
Posts: 8
Default

What's Taking place i'm new to this, I stumbled upon this I've found It positively useful and it has helped me out loads. I hope to contribute & help different customers like its helped me. Good job.
  #17   Report Post  
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by Walter Briscoe View Post
I am using XL 2003. I have a need to run Internet Explorer for about 20k URLs. This is beyond the capacity of IE on my system. I use a 30 second watchdog timer to detect IE becoming unreasonably slow. Relevant code is: ' Needs Tools/References/Microsoft Internet Controls Public ie As SHDocVw.InternetExplorer Private killtime As Date Private Const killduration As String = &quot;00:00:30&quot; .... Private Sub kill_ie() Debug.Print now &amp; &quot; kill_ie() called&quot; killtime = 0 Set ie = Nothing End Sub Public Function Wait4IEretry(ByVal operation As String) As Boolean .... On Error GoTo newie .... killtime = now + TimeValue(killduration) Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=True Wait4IE operation Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False If False Then newie: If killtime &lt;&gt; 0 Then On Error Resume Next ' ontime may not be set Application.OnTime EarliestTime:=killtime, Procedu=&quot;kill_ie&quot;, Schedule:=False End If Set ie = Nothing Resume retry Stop retry: ' Stop Wait4IEretry = False Exit Function End If .... Wait4IEretry = True Exit Function ..... End Function So Wait4IEretry starts a 3o second watchdog timer on Wait4IE completing in 30 seconds. If 30 seconds elapses, kill_ie is called and ie is made nothing, causing Wait4IE to complete with an error and transfer control to label newie. I find &quot;On Error Resume Next&quot; ineffective against errors in Application.OnTime. I zero killtime in kill_ie so Application.OnTime is not called. If I hit escape to allow me to save my XL file, Application.OnTime is called and errors. Why is &quot;On Error Resume Next&quot; ineffective? If 30 seconds does not elapse, the timer is cancelled without problem. I can't work out how to make killduration a date. In the immediate debug window, I see ?#00:00:30# 00:00:30 ?timevalue(&quot;00:00:30&quot;) 00:00:30 In the debug code window, Private Const killduration As Date = #00:00:30# is transformed into Private Const killduration As Date = #12:00:30 AM# As an sside, many cells in my worksheet have a small triangle marking their upper left corner. I remember that as meaning there is some strangeness about the data in the marked cells. I just can't work out how to Google it. excel cell warning message is ineffective. excel cell triangle corner suggests a formula error and that a trace error button should appear - it does not - the cells contain values. Unsetting Tools/Options/Error checking/Number stored as text causes those triangles to vanish and I now know what the issue is. How to I get &quot;Number stored as text&quot; to appear as a warning? -- Walter Briscoe
Doc Chi Tiet Tai: http://4banh.info/ford-explorer-xe-7...-tai-viet-nam/

Xem Them Cac Bai Viet Khac Chua Chung Toi Tai: http://4banh.info/
  #18   Report Post  
Junior Member
 
Posts: 3
Default

Chúc mọi điều may mắn
  #19   Report Post  
Junior Member
 
Posts: 1
Default

Chúc mọi điều may mắn
  #20   Report Post  
Junior Member
 
Posts: 10
Default

gọi đ*p Huyen Mới Nguyen em ăn chồng phá Đang đấy. đi xong trưa :v. Tâm nay M*p chị về chỗ Gam Gọi Jessica vợ gặp Gấu cả kêu Bùi Thu Bui Nguyen
Bảo Hiểm Daiichi life


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
timer Roger on Excel Excel Programming 2 August 3rd 08 11:37 AM
timer mike allen[_2_] Excel Programming 3 March 16th 07 11:05 PM
Lap-timer kabildgaard Excel Discussion (Misc queries) 0 August 11th 06 03:26 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
need help with a timer ionaman Excel Programming 0 April 13th 04 08:40 PM


All times are GMT +1. The time now is 05:00 PM.

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

About Us

"It's about Microsoft Excel"