I want to add in a variable from pivot table using VBA. Please kindly advise me. Your help will be very much appreciated. Thanks you.
Code:
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+v
'
cdcd = Worksheets("sheet8").Range("AQ2")
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Date")
.PivotItems("cdcd").Visible = True
.PivotItems("2013").Visible = True
End With
End Sub
Last edited by a moderator: