Results 1 to 4 of 4

Thread: [Excel] Dynamic Web Query Returning no Data

  1. #1
    New Member
    Join Date
    May 12
    Posts
    6

    [Excel] Dynamic Web Query Returning no Data

    Hello everyone,

    I'm completely new to VB editing and I finally got the basics of the web query working. However, when I try to make it dynamic by referencing a cell for the parameter, it say the web query returned no data.

    I'm not sure what I'm doing wrong...it should be a very simple query, I only have one parameter.

    Here's my code:

    activecell.QueryTable.Connection="URL;http://www.google.com/products/catalog?cid=[""GoogleNumber""]"

    Everything works fine until I click "refresh" and select the cell I want the query to use for the CID/Google Number.

    Can anyone help?

  2. #2
    Addicted Member
    Join Date
    Jul 09
    Posts
    208

    Re: [Excel] Dynamic Web Query Returning no Data

    You don't need VBA code to make a web query dynamic by referencing a cell for the parameter, as you describe, and it refreshing automatically when the cell value changes. Everything can be set up using the Excel UI - see http://www.jkp-ads.com/articles/webquery.asp

  3. #3
    New Member
    Join Date
    May 12
    Posts
    6

    Re: [Excel] Dynamic Web Query Returning no Data

    Thank you. I figured out what was wrong all along - the actual value I was testing with was incorrect. As in, the GoogleNumber value was wrong. Lol. At least I know my method was right!

  4. #4
    New Member
    Join Date
    May 12
    Posts
    6

    Re: [Excel] Dynamic Web Query Returning no Data

    This is resolved now.

    It was the value I was trying to use to test that was wrong, so my code was ok. I fudged up my number somehow, haha. Sometimes the problem is so silly.
    Last edited by tcss; May 25th, 2012 at 11:04 AM. Reason: More info

Posting Permissions

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