property InsideZooms.Contains (DateTime as Variant) as InsideZoom
Returns the InsideZoom object that contains the specified date-time.

TypeDescription
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 Contains property returns the InsideZoom object that contains the specified date-time. The Item property looks for the exact date-time, while the Contains search for the giving date-time. The Count property specifies the number of inside zoom units. The InsideZooms collection may be enumerated using for each statements.

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.