LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change pivotfilter value1 parameter in code PeterF Excel Programming 0 November 29th 08 12:01 PM
Get errors when updating PivotFilters PeterF Excel Programming 0 November 29th 08 11:56 AM
PivotFilters in pivottable amit Excel Programming 0 October 15th 08 03:24 AM
Error Using the PivotFilters function jmlozares Excel Programming 2 July 21st 08 10:15 AM
scatter plots and "label" as ("X" value1, value2) shabnam Charts and Charting in Excel 3 April 11th 05 02:24 PM


All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"