#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default VBA Hangs

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default VBA Hangs

I have the exact same problem... It's driving me nuts!
Have you found the answer?

"Bill Martin" wrote:

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default VBA Hangs

None... Someone suggested that perhaps the IE cache was over filling and that
emptying it first would help. He provided a link to this VB patch software to
do it, but I haven't tried it yet. Or even know if it will work in VBA.

http://vbnet.mvps.org/index.html?cod...teurlcache.htm

The timer question has met with resounding silence in several places.

Bill
---------------------------------
Albert wrote:
I have the exact same problem... It's driving me nuts!
Have you found the answer?

"Bill Martin" wrote:

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default VBA Hangs

Hmmm...
Lets try troubleshooting it ourselves...

Here are some of the possible culprits in my list. Do you use any of these?

Office 2010 Tech Preview (but the problem occurrs in all installed versions
of office)
Firefox (latest)
IE8
Digsby
Dropbox
Evernote
Windows XP
AVG 8.5
CLCL (Clipboard manager)

Everything up to date...

Regards,
Albert

"Bill Martin" wrote:

None... Someone suggested that perhaps the IE cache was over filling and that
emptying it first would help. He provided a link to this VB patch software to
do it, but I haven't tried it yet. Or even know if it will work in VBA.

http://vbnet.mvps.org/index.html?cod...teurlcache.htm

The timer question has met with resounding silence in several places.

Bill
---------------------------------
Albert wrote:
I have the exact same problem... It's driving me nuts!
Have you found the answer?

"Bill Martin" wrote:

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default VBA Hangs

My system:

1) Office 2003
2) Firefox at the latest level.
3) IE8 installed, but very rarely used.
4) No Digsby, dropbox, evernote or CLCL.
5) AVG 8.5
6) Two machines, one with XP and one with Vista. It will fail on both on rare
and seemingly random occasions.

All software at current levels.

I also have a friend who is using my spreadsheet and he claims to have never
seen it lock up. He's running the latest Excel version under Vista, but I don't
know what Virus program. Perhaps I should ask.

Bill
----------------------------
Albert wrote:
Hmmm...
Lets try troubleshooting it ourselves...

Here are some of the possible culprits in my list. Do you use any of these?

Office 2010 Tech Preview (but the problem occurrs in all installed versions
of office)
Firefox (latest)
IE8
Digsby
Dropbox
Evernote
Windows XP
AVG 8.5
CLCL (Clipboard manager)

Everything up to date...

Regards,
Albert

"Bill Martin" wrote:

None... Someone suggested that perhaps the IE cache was over filling and that
emptying it first would help. He provided a link to this VB patch software to
do it, but I haven't tried it yet. Or even know if it will work in VBA.

http://vbnet.mvps.org/index.html?cod...teurlcache.htm

The timer question has met with resounding silence in several places.

Bill
---------------------------------
Albert wrote:
I have the exact same problem... It's driving me nuts!
Have you found the answer?

"Bill Martin" wrote:

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default VBA Hangs

Hi Bill.

I just uninstalled IE8.0 and my queries now seem to be running consistently
now, at least since yesterday.
I'll probably leave IE8.0 uninstalled for now and see how things evolve
before trying to reinstall IE8.0. (I seldom use it anyway)

Perhaps you could do the same so we can continue to troubleshoot and verify
the culprit to be IE8.0?

If you wish please contact me directly at

(Remove "spamgibberish" from the above email).

Albert C.

"Bill Martin" wrote:

My system:

1) Office 2003
2) Firefox at the latest level.
3) IE8 installed, but very rarely used.
4) No Digsby, dropbox, evernote or CLCL.
5) AVG 8.5
6) Two machines, one with XP and one with Vista. It will fail on both on rare
and seemingly random occasions.

All software at current levels.

I also have a friend who is using my spreadsheet and he claims to have never
seen it lock up. He's running the latest Excel version under Vista, but I don't
know what Virus program. Perhaps I should ask.

Bill
----------------------------
Albert wrote:
Hmmm...
Lets try troubleshooting it ourselves...

Here are some of the possible culprits in my list. Do you use any of these?

Office 2010 Tech Preview (but the problem occurrs in all installed versions
of office)
Firefox (latest)
IE8
Digsby
Dropbox
Evernote
Windows XP
AVG 8.5
CLCL (Clipboard manager)

Everything up to date...

Regards,
Albert

"Bill Martin" wrote:

None... Someone suggested that perhaps the IE cache was over filling and that
emptying it first would help. He provided a link to this VB patch software to
do it, but I haven't tried it yet. Or even know if it will work in VBA.

http://vbnet.mvps.org/index.html?cod...teurlcache.htm

The timer question has met with resounding silence in several places.

Bill
---------------------------------
Albert wrote:
I have the exact same problem... It's driving me nuts!
Have you found the answer?

"Bill Martin" wrote:

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default VBA Hangs

SOLVED!
The Culprit: AVG (parts of it)
All you have to do to is reinstall AVG choosing which components to install.
Unselect LinkScanner and Microsoft Office Addin.
After doing this I started getting BSOD's galore, and this was solved by
re-installing Firefox.



"Bill Martin" wrote:

My system:

1) Office 2003
2) Firefox at the latest level.
3) IE8 installed, but very rarely used.
4) No Digsby, dropbox, evernote or CLCL.
5) AVG 8.5
6) Two machines, one with XP and one with Vista. It will fail on both on rare
and seemingly random occasions.

All software at current levels.

I also have a friend who is using my spreadsheet and he claims to have never
seen it lock up. He's running the latest Excel version under Vista, but I don't
know what Virus program. Perhaps I should ask.

Bill
----------------------------
Albert wrote:
Hmmm...
Lets try troubleshooting it ourselves...

Here are some of the possible culprits in my list. Do you use any of these?

Office 2010 Tech Preview (but the problem occurrs in all installed versions
of office)
Firefox (latest)
IE8
Digsby
Dropbox
Evernote
Windows XP
AVG 8.5
CLCL (Clipboard manager)

Everything up to date...

Regards,
Albert

"Bill Martin" wrote:

None... Someone suggested that perhaps the IE cache was over filling and that
emptying it first would help. He provided a link to this VB patch software to
do it, but I haven't tried it yet. Or even know if it will work in VBA.

http://vbnet.mvps.org/index.html?cod...teurlcache.htm

The timer question has met with resounding silence in several places.

Bill
---------------------------------
Albert wrote:
I have the exact same problem... It's driving me nuts!
Have you found the answer?

"Bill Martin" wrote:

I have VBA code that reaches out to Yahoo to retrieve some information.
Occasionally it will hang indefinitely. I get the status message "Connecting to
the web" so my assumption is that the web has not responded with some hand shake
that Excel was expecting to get. When it hangs there's apparently no way to
shake it alive from the keyboard. I can only exit Excel entirely and restart
everything.

I've tried trapping the hang with an "On Error Goto" statement, but apparently
Excel does not think there's any actual error - it's just waiting for a response.

The actual web fetch is of the form:

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=QuerySht.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Is there some way I could set a timer for 10 seconds, or whatever, before
executing the web fetch and use it to somehow 'Break' execution of the VBA
statement that's hung?

Thanks.

Bill


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
sql hangs Richard Douglass Excel Programming 3 June 15th 09 05:44 AM
sql hangs Jim Cone[_2_] Excel Programming 0 June 15th 09 04:48 AM
Excel hangs... coder_arun Excel Programming 2 April 25th 06 01:46 PM
Macro Hangs GregR Excel Programming 0 March 27th 06 10:40 PM
VBA Hangs sponny Excel Programming 2 November 4th 05 02:58 PM


All times are GMT +1. The time now is 09:18 AM.

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"