I am trying to set a Timeline date range using VBA.
It seems to select the timeline as I see the border light up but it does not change the the date range, no errors occur the sub just stops without updating the date range. I checked my references to the dates and they are formatted as a date "10/01/2016". I even directly tried putting in the date instead of sd and ed and still no update of the timeline.
Any help would be grateful.
Thanks
Code:
sub DateTest()
Dim sd as Date
Dim ed as Date
sd = Sheets("Stuff").Range("B11").Value
ed = Sheets("Stuff").Range("C11").Value
Sheets("Charts").Shapes.Range(Array("Date6")).Select
ActiveWorkbook.SlicerCaches("NativeTimeline_Date6").TimelineState.SetFilterDateRange sd, ed
end sub
It seems to select the timeline as I see the border light up but it does not change the the date range, no errors occur the sub just stops without updating the date range. I checked my references to the dates and they are formatted as a date "10/01/2016". I even directly tried putting in the date instead of sd and ed and still no update of the timeline.
Any help would be grateful.
Thanks