I have some code that will generate a string that I need to use in a macro created pivot table. The string that gets created is Array(Array("'0342'!A1:AZ50", "0342"), Array(Array("'0370'!A1:AZ50", "0370"), Array(Array("'0411'!A1:AZ50", "0411"), Array(Array("'Sheet1'!A1:AZ50", "Sheet1"))
When I run the macro I get the "Cannot open PivotTable source file error" and it will highlight this section of code.
ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
combarray, Version:=xlPivotTableVersion15). _
CreatePivotTable TableDestination:="[master.xlsm]Sheet1!A1", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion15
The string combarray is where I think the issue is but not sure how to correct it.
Thanks for any help
When I run the macro I get the "Cannot open PivotTable source file error" and it will highlight this section of code.
ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
combarray, Version:=xlPivotTableVersion15). _
CreatePivotTable TableDestination:="[master.xlsm]Sheet1!A1", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion15
The string combarray is where I think the issue is but not sure how to correct it.
Thanks for any help