LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Bypass Error Q

I have a simple piece of code below that refresh's some web queries to
get stock prices. What I have encountered is that sometimes a
particular query will return an error (web page not available etc),
what I wish to do, is if that happens, just bypass the particular
query and move to the next one.

How would I incorporate that in to be code?

Sub GetLatestPrices()

Application.ScreenUpdating = False
Sheets("Web Prices").Activate
ActiveSheet.Visible = True

Range("A3").Select
Selection.QueryTable.Refresh BackgroundQuery:=False

Range("A14").Select
Selection.QueryTable.Refresh BackgroundQuery:=False

Range("A25").Select
Selection.QueryTable.Refresh BackgroundQuery:=False

Application.ScreenUpdating = True

End Sub
 
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
Bypass Auto_Open Brian Excel Programming 13 October 4th 08 09:23 PM
How to bypass Excel error message matelot Excel Programming 2 August 28th 06 06:48 AM
Bypass Worksheet_Change Sub Matt Excel Programming 3 February 21st 06 09:57 PM
Bypass an Ken Loomis Excel Programming 4 July 3rd 05 04:34 PM
How to "bypass" run-time error '91'???? Jeff[_43_] Excel Programming 1 December 13th 04 08:42 PM


All times are GMT +1. The time now is 06:57 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"