+ Reply to Thread
Results 1 to 5 of 5

Userform TextBox Multiline Declaration

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Userform TextBox Multiline Declaration

    Hi,

    I am working with FreeFile, and instead of adding 2 textboxes, I am using only 1 multiline textbox. And I would like to know how to declare each line of that TextBox in my vba code?

    Please Login or Register  to view this content.
    This will take the whole box.

    Thanks for help.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Userform TextBox Multiline Declaration

    Do you mean something like

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Userform TextBox Multiline Declaration

    No, ur code will be to add text in multiline to the textbox. I already set the property of the textbox to multiline.
    Now I want to declare them in separate code.
    Example:
    TextBox 1:
    | COOL |
    | GREAT |

    I want to declare in my vba to something:
    TextBox1$ = UserForm1.TextBox1.Line1
    TextBox2$ = UserForm1.TextBox1.Line2

    So if I put TextBox1$, it will send "COOL"
    If I put TextBox2$, it will send "GREAT"

    Thanks.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Userform TextBox Multiline Declaration

    A text box doesn't have a .Line1 property. you could do something like
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Userform TextBox Multiline Declaration

    Great thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Refreshing multiline textbox on userform while code is running
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2013, 01:46 PM
  2. Replies: 2
    Last Post: 01-05-2013, 12:42 AM
  3. TextBox MultiLine and WordWrap
    By BillWilts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2010, 12:52 PM
  4. Issue with multiline textbox on userform
    By aurora738 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2009, 12:51 PM
  5. [SOLVED] Userform Textbox multiline Vs format in worksheet
    By Jim May in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-16-2005, 06:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1