Excel Web Query Error 1004
Contents |
Forums Excel Questions Run Time Error 1004 - WebQuery Results 1 to 5 of 5 Run Time Error 1004 - WebQueryThis is a discussion on Run Time Error 1004 - WebQuery
Excel Error 1004 Application-defined Or Object-defined Error
within the Excel Questions forums, part of the Question Forums category; I have excel error 1004 macro a webquery that works. I have it cycle through about 50 names and pull the information from the ... LinkBack excel error 1004 method range of object _worksheet failed LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Display Linear Mode Switch to Hybrid Mode Switch to Threaded
Excel Error 1004 Method Range Of Object _global Failed
Mode Oct 1st, 2009,06:29 PM #1 marihouse Board Regular Join Date Jan 2004 Posts 84 Run Time Error 1004 - WebQuery I have a webquery that works. I have it cycle through about 50 names and pull the information from the web for a range of dates for each name and import the data. My problem is if I pull the data for all 50 names for
Excel Error 1004 Select Method Of Range Class Failed
August 1st thru September 30th, it works because there is a webpage of data for everybody within that timeframe. But, if I just pull data for say September 27th thru September 30th only 35 of them might actually have the web data page for that date range. So as it cycles through the names and gets to one that doesn't have data for that date range (the date range is part of the webpage address) then I get the runtime error 1004 and the page doesn't exist. How can I tell it to skip over that page instead of the macro stopping with the error? I have no way of knowing which names have data or not for a specific date range and I am wanting to add to my current data and not wanting to do the entire set of available dates each time, because my lookups and formulas that are depending on the data makes it take too long to calculate once I have retrieved it. I just need the most recent data each time. Thanks. Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Oct 1st, 2009,07:06 PM #2 John_w Board Regular J
VBA Code & Other Help Excel Help VBA Web Query Generating Error 1004 If this is your first visit, be sure to check out the FAQ by clicking the vba excel error 1004 link above. You may have to register before you can post: click
Error 1004 Excel 2013
the register link above to proceed. To start viewing messages, select the forum that you want to run time error 1004 excel vba visit from the selection below. Results 1 to 1 of 1 Thread: VBA Web Query Generating Error 1004 Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode http://www.mrexcel.com/forum/excel-questions/419883-run-time-error-1004-webquery.html Switch to Hybrid Mode Switch to Threaded Mode 03-31-2008,05:50 AM #1 bob135 View Profile View Forum Posts View Blog Entries View Articles VBAX Newbie Joined Mar 2008 Posts 1 VBA Web Query Generating Error 1004 I have several web queries that get data from yahoo finance and google finance. It generates the following Error: Run Time Error 1004 the http://www.vbaexpress.com/forum/showthread.php?18700-VBA-Web-Query-Generating-Error-1004 file could not be accessed. Try one of the following: -Make sure the folder exists -Make sure the file isn't read only -Make sure no < > | [and other special characters] are in the filename -Make sure the file path is less than 218 [characters] This is the code for the refresh: Range("YHOOCompanyData").QueryTable.Refresh BackgroundQuery:=False Range("GoogleWebData").QueryTable.Refresh BackgroundQuery:=False These are the actual queries: ([Ticker] just refers to some other cell) WEB 1 [yahoo finance url]lookup?s=["Ticker"] Selection=EntirePage Formatting=None PreFormattedTextToColumns=True ConsecutiveDelimitersAsOne=True SingleBlockTextImport=False DisableDateRecognition=False DisableRedirections=False WEB 1 [google finance url]["Ticker"] Selection=EntirePage Formatting=None PreFormattedTextToColumns=True ConsecutiveDelimitersAsOne=True SingleBlockTextImport=False DisableDateRecognition=False DisableRedirections=False NOTE: URLS are a bit inaccurate since I couldn't post links, but you get the idea and I don't think I'm querying from a bad page (since it works some of the time) It gets the data inconsistently...sometimes it works fine and sometimes it fails. This is also true of manual refresh. At one point I attempted 9 manual refreshes and they all failed, but at other times I can do 10-20 in a row with no problems. Ideally, I could av
Unanswered Topics Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA VBA Web Query Generating Error 1004 User http://p2p.wrox.com/excel-vba/67023-vba-web-query-generating-error-1004-a.html Name Remember Me? Password Reminder Password Register Register | FAQ | Members https://forums.techguy.org/threads/solved-excel-web-query.782450/ List | Calendar | Today's Posts | Search Excel VBA Discuss using VBA for Excel programming. Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the Excel VBA section error 1004 of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that excel error 1004 are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) March 31st, 2008, 07:59 AM bob135 Registered User Join Date: Mar 2008 Location: , , . Posts: 1 Thanks: 0 Thanked 0 Times in 0 Posts VBA Web Query Generating Error 1004 I have several web queries that get data from yahoo finance and google finance. It generates the following Error: Run Time Error 1004 the file could not be accessed. Try one of the following: -Make sure the folder exists -Make sure the file isn't read only -Make sure no < > | [and other special characters] are in the filename -Make sure the file path is less than 218 [characters] This is the code for the refresh: Range("YHOOCompanyData").QueryTable.Refresh BackgroundQuery:=False Range("GoogleWebData").QueryTable.Refresh BackgroundQuery:=False These are the actual queries: ([Ticker] just refers to some other cell) WEB 1 http://finance.yahoo.com/lookup?s=["Ticker"] Selection=EntirePage Formatting=None PreFormattedTextToColumns=True ConsecutiveDelimitersAsOne=True SingleBlockTextImport=False DisableDateRecognition=False DisableRedirections=False WEB 1 http://finance.google.com/finance?fstype=ii&q=["Ticker"] Selection=EntirePage Formatting=None PreFormattedTextToColumns=True ConsecutiveDelimitersAsOne=True SingleBlockTextImport=False DisableDateRecognition=False DisableRed
Tech Support Guy, we highly recommend that you visit our Guide for New Members. Solved: excel web query Discussion in 'Business Applications' started by cpossamai, Dec 23, 2008. Thread Status: Not open for further replies. Advertisement cpossamai Thread Starter Joined: Dec 23, 2008 Messages: 13 I am trying to do a web query on http://www.tntexpress.com.au/interaction/asps/transitTimes_tntau.asp with information entered into the text boxes and the result into excel. I have tried using a macro but it failed and I'm not sure if I am supposed to use post or some other way for text boxes: Sub Login_WebQuery() Dim MyPost As String Const MyUrl As String = "http://www.tntexpress.com.au/interaction/asps/transittimesX_tntau.asp?" 'DONT FORGET TO COPY LINK LOCATION BECAUSE TECH SUPPORT GUY SHORTENS THE ADDRESS Const PostOSuburb As String = "txtOSuburb=CRANBOURNE" Const PostOState As String = "&txtOState=VIC" Const PostOCode As String = "&txtOPcode=3977" Const PostDSuburb As String = "&txtDSuburb=ASPENDALE" Const PostDState As String = "&txtDState=VIC" Const PostDCode As String = "&txtDPcode=3195" Const Postcolmonth As String = "&colmonth=December" Const Postcolyear As String = "&colyear=2008" Const Postcolhour As String = "&colhour=15" Const Postcolmin As String = "&colmin=00" MyPost = PostOSuburb & PostOState & PostOPcode & PostDSuburb & PostDState & PostDPcode & Postcolmonth & Postcolyear & Postcolhour & Postcolmin With ActiveSheet.QueryTables.Add(Connection:= _ "URL;" & MyUrl, Destination:=Cells(1, 1)) .PostText = MyPost .BackgroundQuery = True .TablesOnlyFromHTML = True .Refresh BackgroundQuery:=False .SaveData = True End With End Sub hope someone can help! Thanks cpossamai, Dec 23, 2008 #1 Sponsor cpossamai Thread Starter Joined: Dec 23, 2008 Messages: 13 Further to my post (and also to bump up) The error produced is 'run time error 1004' Unable to open http://www.tntexpress.com.au/interaction/asps/transittimesX_tntau.asp? (click on the link to see what I am talking about, enter in t