Consulting

Results 1 to 2 of 2

Thread: TextBox Challenge

  1. #1
    VBAX Newbie
    Joined
    Nov 2012
    Posts
    3
    Location

    TextBox Challenge

    Hi, so I'm trying to create some sort of report generator.

    It has a multipage and on the first tab it would request for inputs such as Names, Age etc.

    On second tab, it has a Objective textbox. So my question is how can I do, for example putting a placeholder "%Name% is currently %Age% years old" in the Objective textbox ?

    Is this possible ? Thanks,

    Regards,
    Arbitel

  2. #2
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    With VBA you don't need the placeholder, just build the string and insert it into the .Text property of the TextBox. Such as:

    [vba]
    msgText = NameTextBox.text & " is currently " & NameTextBox.text & _
    "years old"
    ObjectiveTextBox.text = msgText[/vba]
    _________________________________________________________________________
    "In theory there is no difference between theory and practice. In practice there is." - Chuck Reid

    Any day you learn something new is a day not wasted.

Posting Permissions

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