Hi!
I have the following questions
I) how can attribute the result from a query to an array?
Code:
Sheets(shtData).ActiveCell.CopyFromRecordset rsData
works fine to output in a cell but I would need something among the lines
Code:
Dim myArr() As Variant
Code:
myArr <- rsData '<- attribution of values
II) I also would like to parameter the output of a query on a given range but the following gives me an error (propriety or method not available for this object)
Code:
Dim rng As Range
Set rng = Range(Cells(2, nbCol), Cells(2, nbCol))
Sheets(shtData).rng.CopyFromRecordset rsData
I guess there is something with the range property I misunderstood. Any idea?
Thanks
Anne-Olga