Hello there, i'm very new in vba and i've been searching for an answer from a lot of sites, but nothing yet done, here's the thing:
I've some slicers using daily "date" obtained from pivot table and from cube connection, it's not good to me viewing all days of the year or past year, etc. i wish to know if it's possible to auto select the last day from a specific slicer like:
date.png
Is possible to me see if the slicer exists with "Exists" result:
Sub DoesSlicerExist()
Dim wb As Workbook
Dim slItem As SlicerItem
Dim slCache As SlicerCache
Set wb = ThisWorkbook
With wb
If Not .SlicerCaches("Slicer_FechaDiario") Is Nothing Then
Debug.Print "Exists"
Else
Debug.Print "Does Not Exist"
End If
End With
Set wb = Nothing
End Sub
I don't really know how to start this, could be using some of this?:
Private Sub test()
Dim i As SlicerCaches
or
Dim i As Slicers
or
Dim i As Slicer
Set i = ActiveWorkbook.SlicerCaches
i.SlicerCache.SlicerItems(1).Selected = False
or
i("Slicer_FechaDiario").SlicerItems(1).Selected = True
Well hope this helps to see what i need, thanks in advance for any clue to solve this 
Very Sorry if this post should be in " Excel Programming / VBA / Macros " instead of here, i hope some admin could change it where it belongs, thanks
Bookmarks