|
-
May 24th, 2012, 01:42 PM
#1
Thread Starter
New Member
[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?
-
May 24th, 2012, 06:46 PM
#2
Addicted Member
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
-
May 25th, 2012, 10:34 AM
#3
Thread Starter
New Member
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!
-
May 25th, 2012, 10:35 AM
#4
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|