Dundee Lad
Active Member
- Joined
- Sep 6, 2003
- Messages
- 311
Hi board, this macro stops and gives an error when it doesn’t find anything else starting with F, can you help me find out why?
The FieldName & Pivot get passed in the calling of the macro
The FieldName & Pivot get passed in the calling of the macro
Code:
Dim pItem As PivotItem
For Each pItem In pt.PivotFields(strFieldName).PivotItems
If pItem.Value Like "F*" Then
pItem.Visible = True
Else
pItem.Visible = False
End If
Next