Using Dynamic Ranges in Get Data command

G

Guest

Hello

Is it possible to use a reference "Data" which is a dynamic range to be used
within a GetData command as per below:

'Get the cell values and copy it to DyRng
GetData MyFiles(Fnum), Application.Goto Reference="Data", Dyrng, False, False

If so what is the best way to incorporate this as I get a compile error for
this.

Thank you in advance for your help.

Regards,
 
G

Guest

I've not done coding relative to Pivot tables, and it appears that GetData is
related to them. If you have a dynamic range (Data) already defined, You
could try something like this:

Dim DyRng as range

Set DyRng = Worksheets("Sheet1").range("Data")
 
G

Guest

Thanks, but that doesn't work.

The GetData is in relation to using ADO, in order to compile data from
several files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top