L
Legacy 367316
Guest
Trying to created a Pivot Table on an existing worksheet. This is the code that was recorded during the record macro. I stopped recording and then ran the code but when I go to run it again it gives me an error. Run-time error '5': invalid procedure call or argument
Any help would be greatly appreciated.
Sub Macro12()
'
' Macro12 Macro
'
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Outage Data!R1C1:R526C9", Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:="CEMI Devices!R3C5", TableName:="PivotTable4", _
DefaultVersion:=xlPivotTableVersion14
End Sub
Any help would be greatly appreciated.
Sub Macro12()
'
' Macro12 Macro
'
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Outage Data!R1C1:R526C9", Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:="CEMI Devices!R3C5", TableName:="PivotTable4", _
DefaultVersion:=xlPivotTableVersion14
End Sub