![]() |
using variable in value1 of PivotFilters.Add
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 |
using variable in value1 of PivotFilters.Add
Hi,
Can anybody help me out in using variable in Value1 of PivotFilters.Add. Thanks. aamerrasheed wrote: 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 -- Message posted via http://www.officekb.com |
All times are GMT +1. The time now is 01:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com