A
aamerrasheed
Hi,
I am new to Macros and VBA. Trying to use a variable for value1 of
pivotfilters.add but it isn't working.
getting runtime error 1004.
Dim a As Variant
filtname = InputBox("Which data do you want", "Data input")
ActiveSheet.PivotTables("PivotTable1").PivotFields("Release cause"). _
PivotFilters.Add Type:=xlCaptionContains, Value1:=filtname
Thanks.
Aamer
I am new to Macros and VBA. Trying to use a variable for value1 of
pivotfilters.add but it isn't working.
getting runtime error 1004.
Dim a As Variant
filtname = InputBox("Which data do you want", "Data input")
ActiveSheet.PivotTables("PivotTable1").PivotFields("Release cause"). _
PivotFilters.Add Type:=xlCaptionContains, Value1:=filtname
Thanks.
Aamer