Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Aug 2003
    Location
    Voorhees, New Jersey
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text boxes I ('97)

    Is there a way to have a text box show the contents of two separate cells?
    Would I use the "&" or "+" ?
    Also, how do I insert a carriage return in a text box?

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text boxes I ('97)

    A textbox on a sheet can only be tied to a single cell. You'll need to have a formula in a cell that puts together the strings and use that cell as the source for the textbox.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    3 Star Lounger
    Join Date
    Aug 2003
    Location
    Voorhees, New Jersey
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text boxes I ('97)

    Now why didn't I think of that?
    (Don't answer that!)

    How would I force a carriage return in the resulting text box?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: text boxes I ('97)

    You can concatenate with CHAR(10) to insert a line feed:

    =A1&CHAR(10)&A2

    In the cell containing this formula, the CHAR(10) will look like a box, unless you set the cell to wrap, but in the text box referring to the cell with the formula, it will be a line feed. Alternatively, you can concatenate with " followed by Alt+Enter followed by ". This will insert a line feed directly into the formula itself, making it look weird:

    =A1&"
    "&A2

  5. #5
    3 Star Lounger
    Join Date
    Aug 2003
    Location
    Voorhees, New Jersey
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text boxes I ('97)

    Too much! Thanks.

    RELATED:
    How do I get an existing text boxes content into a regular spreadsheet cell?
    (Right now, I'm doing it manually...via cut & paste...)

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: text boxes I ('97)

    Either copy/cut and paste or use a line like this in a macro

    <pre>Range("a1") = Activesheet.TextBoxes("Text Box 1").Text</pre>


    Change the text box name as appropriate

    Steve

Posting Permissions

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