matt_the_hat
New Member
- Joined
- Mar 26, 2009
- Messages
- 4
I have recorded a macro to create a really basic pivot table but when I run the macro I get a 'Run Time Error 5' message. When I try to debug this is where the error is:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Property!R1C1:R971C32", Version:=6).CreatePivotTable TableDestination:= _
"Sheet14!R3C1", TableName:="PivotTable2", DefaultVersion:=6
FYI -For Source Data I use '"Ctrl-A" to select all as the data range will change each time.
Any help would be much appreciated!
Thanks
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Property!R1C1:R971C32", Version:=6).CreatePivotTable TableDestination:= _
"Sheet14!R3C1", TableName:="PivotTable2", DefaultVersion:=6
FYI -For Source Data I use '"Ctrl-A" to select all as the data range will change each time.
Any help would be much appreciated!
Thanks