I have the following code snippet:
ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\Contoso\Desktop\ArquivosDoContoso.csv", Destination:=Range _
("$A$1"))
In the Destination:=Range _ ("$A$1"))
part, how do I put the name of the PivotTable?
For example: I created a PivotTable with the name TBDados
, how can I make the Destination:=Range _ ("$A$1")
be this table? Regardless of the line that the table starts?
I've tried Destination:=Range _ ("$TBDados$")
, but it returns the following error:
The 'Range' method of the '_Global' object failed.