-
Another beginner's question: =)
Is it possible to substitute an object name with a string value?
Say if I have an object called Text1, and I have a string called Data, which in this case has the value Text1.
I tried using something like "Data".Caption = "Blah blah blah." but it didn't work. How can I substitute a name with a value?
Thanks. =)
-Git
-
Declare it as an Object.
Code:
Dim Data As Object
Set Data = Command1
Data.Caption = "Hello"
-
<?>
...if your object is already on the form.
Private Sub Command1_Click()
Data = "Bla bla bla"
Command1.Caption = Data
End Sub