Hello all,
I would like to ask you all, if you can help me with this seamingly simple task.... I need to change Value1 in a dynamic way. Value1:= Range("C1").Value
When I run this recorded macro, I always got:
Run-time error '1004':
Application-defined or object-defined error
I am in lost... Could anybody tell me how should I correctly define this existing pivotTable in order to apply dynamic change of Value1?
I would like to ask you all, if you can help me with this seamingly simple task.... I need to change Value1 in a dynamic way. Value1:= Range("C1").Value
VBA Code:
Sub Top10filter()
ActiveSheet.PivotTables("TOP").PivotFields( _
"[summary].[Full_name].[Full_name]").PivotFilters.Add2 Type:=xlTopCount, _
DataField:=ActiveSheet.PivotTables("TOP").CubeFields( _
"[Measures].[Total sum of holiday]"), Value1:=12
End Sub
When I run this recorded macro, I always got:
Run-time error '1004':
Application-defined or object-defined error
I am in lost... Could anybody tell me how should I correctly define this existing pivotTable in order to apply dynamic change of Value1?