tazeo
Board Regular
- Joined
- Feb 15, 2007
- Messages
- 132
- Office Version
- 365
- Platform
- Windows
Got a strange one with this error:
Doesn't happen all the time, but certainly happens for different people on different PCs. Macro is simply creating a Pivot table when the error hits.
When I go debug this is the bit that is highlighted:
I have absolutely no idea what is happening.
Doesn't happen all the time, but certainly happens for different people on different PCs. Macro is simply creating a Pivot table when the error hits.
VBA Code:
Sheets("Paste").Select
Cells.Select
Selection.Copy
Sheets("Cleaned Data").Select
Cells.Select
Range("H1").Activate
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=9
ActiveWindow.LargeScroll ToRight:=-2
ActiveWindow.SmallScroll Down:=-39
Range("A1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Application.CutCopyMode = False
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
UsedRange, Version:=7).CreatePivotTable _
TableDestination:="'OutPut'!R3C2", TableName:="PivotTable1", DefaultVersion _
:=7
Sheets("OutPut").Select
Cells(3, 2).Select
With ActiveSheet.PivotTables("PivotTable1")
When I go debug this is the bit that is highlighted:
VBA Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
UsedRange, Version:=7).CreatePivotTable _
TableDestination:="OutPut!R3C2", TableName:="PivotTable1", DefaultVersion _
:=7
I have absolutely no idea what is happening.