L
Legacy 108787
Guest
My VB code makes a new worksheet for every PT (or rather will in the near future). I'm trying to get that to work, but I ran into some problems with TableDestination.
The worksheet has a variable name, Analyse1, Analyse2, etc.
The code I pasted up there doesn't work, nor do double quotes or no quotes.
Is there a way to have a variable TableDestination in this expression?
Rich (BB code):
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'Data'!" & Rng2.Address(ReferenceStyle:=xlR1C1)).CreatePivotTable TableDestination:= _
"'[Master-File.xls]Analyse'&Nn&''!R9C1 TableName:="meldingen_sectie", DefaultVersion _
:=xlPivotTableVersion10
The worksheet has a variable name, Analyse1, Analyse2, etc.
The code I pasted up there doesn't work, nor do double quotes or no quotes.
Is there a way to have a variable TableDestination in this expression?
Last edited by a moderator: