Hi,
In a pivot table created through vba there is Pivotfield with dates (DD.MM.YYYY). I grouped them with months and years and showed all items.
Showing all items result in displaying start and End values of pivot field (like 01.01.2017). I want them to be not visible. I am trying to do it with following code
It is returning me an error that "Pivot items properties cant assigned to pivot field object". After grupping the pivot field for date. Excel automatically adds a pivot field year.
I will be really grateful for any suggestions/solutions.
Thanks
Best Regards
[/COLOR][/SIZE]
[/FONT]
In a pivot table created through vba there is Pivotfield with dates (DD.MM.YYYY). I grouped them with months and years and showed all items.
Code:
[FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT]
[FONT=Arial][/FONT]
[FONT=Arial][SIZE=3][COLOR=#000000]Worksheets("Pivot_Tabellen").PivotTables(TableName).PivotFields("UTC Date").DataRange.Cells(1).Group Start:=True, End:=True, _
Periods:=Array(False, False, False, False, True, False, True)
[FONT=Times New Roman][/FONT][/COLOR][/SIZE][/FONT][FONT=Arial][SIZE=3][COLOR=#000000]
Worksheets("Pivot_Tabellen").PivotTables(TableName).PivotFields("UTCDate").ShowAllItems = True
[/COLOR][/SIZE][/FONT]
[FONT=Arial]
[SIZE=3][COLOR=#000000][FONT=Times New Roman][/FONT]
Showing all items result in displaying start and End values of pivot field (like 01.01.2017). I want them to be not visible. I am trying to do it with following code
Code:
[FONT=Times New Roman][/FONT]
First_Item= Worksheets("Pivot_Tabellen").PivotTables(TableName).PivotFields("UTCDate").PivotItems(1).Name[FONT=Times New Roman]
[/FONT]
Worksheets("Pivot_Tabellen").PivotTables(TableName).PivotFields("UTC Date").PivotItems(First_Item).Visible= False
It is returning me an error that "Pivot items properties cant assigned to pivot field object". After grupping the pivot field for date. Excel automatically adds a pivot field year.
I will be really grateful for any suggestions/solutions.
Thanks
Best Regards
[/COLOR][/SIZE]
[/FONT]