WinStudio
IWSIDOCollection interface
Returns the number of properties in a specified collection. Read-only.
object.GetNumProperties( )
Part |
Description |
object | Required. A reference to an IDO collection object. |
This method returns the total number of properties in a collection.
The return value is a long integer indicating the number of properties in a collection.
TIP: You can use this number to loop through the properties in a collection. See the following "Example" section.
This method counts the following properties:
Sub Main() Dim i As Integer Dim iNumEntries As Long Dim propertyMsg As String i = 0 ThisForm.SetFocus("grid1") iNumEntries = ThisForm.CurrentIDOCollection.GetNumProperties() propertyMsg = "" Do While i < iNumEntries propertyMsg = propertyMsg & " Property " & (i + 1) & ": " & _ ThisForm.CurrentIDOCollection.GetPropertyName(i) & vbLf i = i + 1 Loop Application.ShowMessage("Total number of properties in this collection: " _ & iNumEntries & vbLf & vbLf & "Properties are: " & vbLf & propertyMsg) End Sub