Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
 
 
 
 
 
TitleUse CallByName to get property values by name
DescriptionThis example shows how to use CallByName to get property values by name in Visual Basic 6. The program calls the CallByName function passing it the property name and the access method VbGet (property get).
KeywordsCallbyName, property
CategoriesSoftware Engineering, Tips and Tricks
 
The program calls the CallByName function passing it the property name and the access method VbGet (property get).
 
Private Sub cmdGet_Click()
Dim result  As Variant

    On Error GoTo CallByNameError
    result = CallByName(m_Person, txtProperty.Text, _
        VbGet)

    lblValue.Caption = result
    Exit Sub

CallByNameError:
    MsgBox "Error " & Err.Number & " getting property." & _
        vbCrLf & Err.Description
    Resume Next
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated