Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm having a Pivot table in a sheet and I want to set a PivotField at predefined value when that value exists in the fields list. The following code works fine but gives an error (-Run-time erro '1004': Unable to get the PivotTables property of the Worksheet class- when the predefined value does not exists in the fields list... How can I transform this into a if-else construction where I check th presence of the predefined value first? (If predefined value isn' available then the option '(blank)' should be selected.) Code ------------------- ActiveSheet.PivotTables("PivotCC").PivotFields("Cu stomerspecs"). _ CurrentPage = "CC missing" ------------------- -- s80N ----------------------------------------------------------------------- s80NL's Profile: http://www.excelforum.com/member.php...fo&userid=3637 View this thread: http://www.excelforum.com/showthread.php?threadid=56159 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PivotField refreshment | Excel Programming | |||
PivotField AfterUpdate event? | Excel Programming | |||
PivotField select all | Excel Programming | |||
How can I hide-Unhide pivotfield using VBA? | Excel Programming | |||
Hiding a pivotfield using code | Excel Programming |