Apr 10 2022 04:57 AM - edited Apr 10 2022 04:59 AM
Does it help if you use
:="'" & pivotWS & "'!R3C1", ...
Apr 10 2022 01:18 PM
What is the error message?
It might help if you attached a copy of the workbook, or uploaded it to a cloud service such as OneDrive, google Drive or Dropbox, obtained a link to the uploaded file and posted that link in a reply.
Apr 11 2022 01:05 AM - edited Apr 11 2022 01:15 AM
Trying this way.
https://drive.google.com/file/d/1Sw7JwqCaPeVxI40-2Uj-mdPUyMsxZjed/view?usp=sharing
macros has name "pivot"
thanks
Apr 11 2022 03:05 AM
When I click that link, I get "You need access"...
Apr 11 2022 01:33 PM
Apr 11 2022 02:08 PM
SolutionThanks, that worked. Use
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"'08.04.2022'!R1C1:R19C9", Version:=6).CreatePivotTable TableDestination:= _
pivotWB & "!R3C1", TableName:="PivotTable1", DefaultVersion:=6
Apr 11 2022 02:08 PM
SolutionThanks, that worked. Use
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"'08.04.2022'!R1C1:R19C9", Version:=6).CreatePivotTable TableDestination:= _
pivotWB & "!R3C1", TableName:="PivotTable1", DefaultVersion:=6