|
|
Title | Use CallByName to set property values by name |
Description | This 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. |
Keywords | CallbyName, property |
Categories | Software 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
|
|
|
|
|
|