COM - dpTypes()
Returns all data point types that match the pattern.
Synopsis
HRESULT dpTypes([in] BSTR sPattern, [out] SAFEARRAY(BSTR) *asDpType);
Parameters
Parameter | Description |
---|---|
sPattern | Pattern that is compared with the available data point types. |
asDpType | Array of data point types that correspond to the pattern. |
Description
The method returns all data point types that correspond to a pattern from the project. An array is returned. The element 0 is empty. Therefore, no error checking is necessary for a for statement from 1 to Ubound (ubound returns a value of type Long, which contains the largest available index for the specified dimension of a data field).
Note:
Note that an array is always returned. The first element
always contains an empty string. This makes it easier to use the following
interpretation.
Example
(See ComSample.xls, CComSample)
Public Sub dpTypes()
Dim asDpType() As String
Dim i As Integer
moComManager.dpTypes "*", asDpType
For i = 0 To UBound(asDpType)
If Left(asDpType(i), 1) <> "_" Then
Debug.Print asDpType(i)
End If
Next i
End Sub
Assignment
COM