Type | Description | |||
DateTime as Variant | A Date-Time expression that specifies the inside zoom unit being searched | |||
InsideZoom | An InsideZoom object being found, or nothing if the date-time is not found |
The following sample shows the Contains implementation:
Private Function InsideZoomContains(ByVal g As EXG2ANTTLibCtl.G2antt, ByVal d As Date) As EXG2ANTTLibCtl.InsideZoom Dim i As EXG2ANTTLibCtl.InsideZoom With g.Chart For Each i In .InsideZooms If (d >= i.StartDate) Then If (d < i.EndDate) Then Set InsideZoomContains = i Exit Function End If End If Next End With Set InsideZoomContains = Nothing End Function
For instance, in the following screen shot, the August 24, 1994 is zoomed, and so the InsideZoom object starts from #08/24/1994# (StartDate), and ends on #08/25/1994# (EndDate)
In this case, the Item(#08/24/1994#) returns the InsideZoom object, while any other date between start and end returns nothing. In case, you are using any mid-date, you have to use the Contains property that searches for the specified date-time.