property Calendar.SelCount as Long
Retrieves the count of selected dates.

TypeDescription
Long A long expression that indicates the count of selected dates.

Use the SelCount property to enumerate the selected dates when the SingleSel property is False. Use the SelectDate property to get the selected date given its index into selected dates collection. The SelectDate(0) and SelDate properties returns the same result ( are equivalents ). Use the FocusDate property to specify the date that has the focus. Use the UnSelDate property to unselect a date.

The following VB sample unselects all dates:

With Calendar1
    While .SelCount() > 0
        .UnSelDate .SelectDate(0)
    Wend
End With

The following C++ sample unselects all dates:

while ( m_calendar.GetSelCount() > 0 )
	m_calendar.UnSelDate( m_calendar.GetSelectDate( 0 ) );

The following VB.NET sample unselects all dates:

With AxCalendar1
    While .SelCount > 0
        .UnSelDate(.get_SelectDate(0))
    End While
End With

The following C# sample unselects all dates:

while (axCalendar1.SelCount > 0)
	axCalendar1.UnSelDate(axCalendar1.get_SelectDate(0));

The following VFP sample unselects all dates:

with thisform.Calendar1
	do while ( .SelCount > 0 )
		.UnSelDate( .SelectDate(0) )
	enddo
endwith