J
Jan Refsdal
I'm attempting to write VBA code for a pivot table range selection, this
expression works when SourceData is set to a fixed range, but when set to
the varaible range selection as noted below I receive the subject error
message
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
Sheets("Sheet1").Range(Cells(1, 1), Cells(i,5))).CreatePivotTable _
TableDestination:="", _
TableName:="PivotTable9"
Thanks
expression works when SourceData is set to a fixed range, but when set to
the varaible range selection as noted below I receive the subject error
message
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
Sheets("Sheet1").Range(Cells(1, 1), Cells(i,5))).CreatePivotTable _
TableDestination:="", _
TableName:="PivotTable9"
Thanks