Results 1 to 3 of 3

Thread: Substitution

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    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

  2. #2
    Guest
    Declare it as an Object.

    Code:
    Dim Data As Object
    Set Data = Command1
    Data.Caption = "Hello"

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    ...if your object is already on the form.

    Private Sub Command1_Click()
    Data = "Bla bla bla"
    Command1.Caption = Data
    End Sub


    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width