jski21
Board Regular
- Joined
- Jan 2, 2019
- Messages
- 133
- Office Version
- 2016
- Platform
- Windows
Good day Mr. Excel Team,
Here's a snippet of code I'm using. Essentially trying to copy a pivot table and paste special the values in:
With ActiveSheet.PivotTables("DrawData").PivotFields("Years")
.Orientation = xlRowField
.Position = 2
Range("A6:F6").Select
Selection.Font.Size = 11
Range("A7").Select
ActiveSheet.PivotTables("DrawData").PivotSelect "Grant[All]", xlLabelOnly + _
xlFirstRow, True
Selection.Font.Size = 11
ActiveSheet.PivotTables("DrawData").PivotSelect "", xlDataAndLabel, True
Selection.Copy
Range("A35").Select.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End With
Getting an Object required error on the isolated red highlighted text portion above. What am I missing? (Object obviously, but need a bit of a nudge on this). Thanks.
jski
Here's a snippet of code I'm using. Essentially trying to copy a pivot table and paste special the values in:
With ActiveSheet.PivotTables("DrawData").PivotFields("Years")
.Orientation = xlRowField
.Position = 2
Range("A6:F6").Select
Selection.Font.Size = 11
Range("A7").Select
ActiveSheet.PivotTables("DrawData").PivotSelect "Grant[All]", xlLabelOnly + _
xlFirstRow, True
Selection.Font.Size = 11
ActiveSheet.PivotTables("DrawData").PivotSelect "", xlDataAndLabel, True
Selection.Copy
Range("A35").Select.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End With
Getting an Object required error on the isolated red highlighted text portion above. What am I missing? (Object obviously, but need a bit of a nudge on this). Thanks.
jski