Querytables.add - Destination variable?

Spurious

Active Member
Joined
Dec 14, 2010
Messages
439
Hello,

is it possible to save the output from querytables.add into a variable instead of a range?

And what comment do I need to use to get the source code from a website?

Thanks in advance!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
is it possible to save the output from querytables.add into a variable instead of a range?
Not directly, because the Destination must be a range. But then you could copy (assign) the range data to a variable, achieving what you want.
And what comment do I need to use to get the source code from a website?
I don't understand what you mean by 'comment'. A web query can't get the source code, only table data.
 
Upvote 0
Try this-untested - dont use pivot tables.

Dim Avar() as variant

Avar=your output ' This should work - the array will be minimun 2 diminsional - most likely starting with element (1,1).


then add a breakpoint and turn on your Locals Window. If you have not used Breakpoints just place STOP in next line- run the code - when it stops - then go to view (on code section) on top - then select Locals Window - now go see the values in Avar
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top