Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleUse CallByName to set property values by name
DescriptionThis example shows how to use CallByName to set property values by name in Visual Basic 6. The program calls the CallByName function passing it the property name, the access method VbLet (property let), and the value.
KeywordsCallbyName, property
CategoriesSoftware Engineering, Tips and Tricks
 
The program calls the CallByName function passing it the property name, the access method VbLet (property let), and the value.
 
Private Sub cmdSet_Click()
    On Error GoTo CallByNameError
    CallByName m_Person, txtProperty.Text, _
        VbLet, txtValue.Text

    ShowNames
    Exit Sub

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