Hi all,
I've encountered the error message (in title). I tried searching the web for a solution but with no luck.
the code segment that receives the error:
With ThisWorkbook
.Sheets.Add(After:=.Sheets(.Sheets.count)).Name = "Load Port Pivot"
End With
Set pc = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=LoadPort.Name & "!" & LoadPort.Range("A1").CurrentRegion.Address, Version:=xlPivotTableVersion15)
Set pt = pc.CreatePivotTable(TableDestination:="'Load Port Pivot'!R1C1", TableName:="LPPivot", DefaultVersion:=xlPivotTableVersion15)
pt.AddFields "ALARM TXT", "ENTITY", "SUB ENTITY"
pt.AddDataField pt.PivotFields("ERROR COUNT"), , xlSum
ActiveSheet.PivotTables("LoadPortPivot").TableStyle2 = "PivotStyleLight15"
when the "set pt= ..." gets highlighted
Bookmarks