BlackKnight
Programmer
Hi,
I am trying to retrieve the property values for a passed object.
I am using the typelib example from a thread here which allows me to get the property names but I receive an error when trying to get the property's value. Thanx in advance.
Dim Obj As New class1
Dim myTLI As TLIApplication
Dim myII As InterfaceInfo
Dim myMI As MemberInfo
Set myTLI = New TLIApplication
Set myII = TLI.InterfaceInfoFromObject(Obj)
For Each myMI In myII.Members
If myMI.InvokeKind = INVOKE_PROPERTYGET Then
'Works correctly.
Debug.Print myMI.Name
'Error occurs here:
'Invalid procedure call or argument
Debug.Print myMI.Value
End If
Next myMI
Have a good one!
BK
I am trying to retrieve the property values for a passed object.
I am using the typelib example from a thread here which allows me to get the property names but I receive an error when trying to get the property's value. Thanx in advance.
Dim Obj As New class1
Dim myTLI As TLIApplication
Dim myII As InterfaceInfo
Dim myMI As MemberInfo
Set myTLI = New TLIApplication
Set myII = TLI.InterfaceInfoFromObject(Obj)
For Each myMI In myII.Members
If myMI.InvokeKind = INVOKE_PROPERTYGET Then
'Works correctly.
Debug.Print myMI.Name
'Error occurs here:
'Invalid procedure call or argument
Debug.Print myMI.Value
End If
Next myMI
Have a good one!
BK