+ Reply to Thread
Results 1 to 10 of 10

vba web query no longer working

  1. #1
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Question vba web query no longer working

    hi all i am using the following code to open a list of links listed in worksheet 1 into worksheet 2

    Please Login or Register  to view this content.
    now when i run this macro instead of getting the contents of each listed link in page 2 all i get is this for each link
    (note i am in france atm)

    Internet Internet opérationnel
    Téléphonie Téléphonie active
    Télévision Télévision connectée
    Version : ########### (censored for public)
    Adresse MAC : ##########(as above)
    Adresse IP : ##########(as above)
    Profil d'accès : neufbox ADSL

    i have no idea why this occurring. strange.

    Any ideas. or should rebooting do the trick will give that a try now.

    thanks.

    Regards
    Dan

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: vba web query no longer working

    Hi Dan,
    Perhaps the web page has changed. I tried your URL of
    URL;http://www.greyhound-data.com/login.htm?z=UFFvLs
    and it said I needed to log in. Did they put another layer of security to get to the page you want?

    I tried to copy and paste your code into a module and it wouldn't compile. Did you give us all the code?

    Another possibility, if you do get past the login sceeen is that WebQuery imports find TABLES of data. If the web page has changed its format and doesn't use HTML tables, your macro won't work.

    Hope the above gives you some things to check.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: vba web query no longer working

    thanks for the response Marvin,

    They are still html tables. I am not a VBA regular and it has been some time since i've used this particular code. I can't find the orginal code. perhaps someone can help me. What i have is a list of urls in sheet 1 all from the same site http://www.greyhound-data.com/ what i need from the vba is for the password and username to be entered before the rest of the code goes through the list. any tips would be greatly appreciated. I remember it being fairly straight forward. VBA is not like riding a bike. thanks again

    Regards
    Dan

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: vba web query no longer working

    Hi Cicada,

    Start your browser and go to the URL and login manually. This will get your through the login screen. Then run Excel and try your code that has the Web Queries. See if they work then. It seems the website recently had to put a login screen in front as per the information there. See http://www.greyhound-data.com/login.htm Perhaps this is all that has changed.

  5. #5
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Question Re: vba web query no longer working

    hi marvin,

    thanks for the response, i already tried that and it is still producing the same. If i don't log in manually it displays the log in screen (you must log in to view this material etc) if i do log in manually and run it, then it brings up that other stuff ip etc. confused.

    Dan

  6. #6
    Registered User
    Join Date
    08-21-2011
    Location
    Saskatoon, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: vba web query no longer working

    Cicada, it may be that your workbook is not authenticated to the site that you want to harvest.

    I use Excel 2003 to harvest scheduling data off our web site every day, but our scheduing site is one that requires username/password to access. In order for my web queries in Excel to work, I have a small corner of my first sheet that I use to web query our login page of our site. I have to use the login through the Excel Web Query, and this then Authenticates the Workbook with our web site, all my web queries run successfully. I notice that even if I log on to our site using ie8, the Excel web queries will fail, because the Workbook itself has not been Authenticated to our site. I've never been able to build the login with the vba successfully, so I continue to use the manual method - right-click a specific cell that holds the web query pointing at our login page - Edit Query - brings up our login page - I login, then I hit cancel on the web query window - Workbook is now Authenticated with the site, and I let it harvest 20 minutes of web queries. Hope this helps.
    Attached Images Attached Images
    Last edited by towncobbler; 08-21-2011 at 07:54 PM. Reason: add screenshots

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: vba web query no longer working

    Hello and welcome to the Forum,

    abousetta
    Last edited by abousetta; 08-21-2011 at 07:52 PM. Reason: Removed original post... misunderstood towncobbler's post.

  8. #8
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: vba web query no longer working

    unless i am missing something he just helped me with my original question I don't see any questions in his post unless he has edited it. Thankyou for the response towncobbler much appreciated.

    Regards
    Dan

  9. #9
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: vba web query no longer working

    Hi towncobbler,

    Apologize for misreading your post.

    abousetta

  10. #10
    Registered User
    Join Date
    08-21-2011
    Location
    Saskatoon, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: vba web query no longer working

    No worries - glad to help where I can.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1