+ Reply to Thread
Results 1 to 7 of 7

Insert Line Breaks in Textbox

  1. #1
    Registered User
    Join Date
    04-13-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    3

    Insert Line Breaks in Textbox

    Hi There,

    I'm fairly new to VBA and was wondering if someone could help me with this. I've got a multiline textbox on a spread sheet being used to capture text which will then be pasted into my companies memo system. What I want to do is add a command button that when pressed inserts a line break every six lines of text.

    i.e. the user would enter this:
    text 1
    text 2
    text 3
    text 4
    text 5
    text 6
    text 7
    text 8

    then press the control button and get this:
    text 1
    text 2
    text 3
    text 4
    text 5
    text 6

    text 7
    text 8

    with a line break between 6 and 7. I'd like to have this repeat every 6 lines.

    Any help would be much appreciated

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Insert Line Breaks in Textbox

    What kind of textbox is it - from the Drawing toolbar or the Control Toolbox?
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    04-13-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Insert Line Breaks in Textbox

    it's from the control toolbar

  4. #4
    Registered User
    Join Date
    02-18-2010
    Location
    Pune
    MS-Off Ver
    Excel 2003
    Posts
    9

    How to copy one column value to another column whose row 2 contain todays date

    Hi

    I am struck up in my code and getting error. It is pretty simple one.


    I have to copy values from column 32 row 3 onwards i.e. cell (x,32) to
    column C row 3 onwards i.e. cell(x, C).
    Column C is column whose row 2 contain today's date.


    I hope I am clear. To simplify this I am taking an example:-


    If cell (2,45) contain todays date then copy all cells(3 onwards, 32)
    to cells(3onwards,45).
    If cell(2,50) contain todays date then copy all cells(3onwards,32) to
    cells(3onwards,45).
    If cell(2,100) contain todays date then copy all cells(3onwards,32) to
    cells(3onwards,100)
    If cell(2,200) contain todays date then copy all cells(3onwards,32) to
    cells(3onwards,200)


    If anything is unclear, please let me know so that I can send you the
    file.


    Regards
    San
    Attached Files Attached Files

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Insert Line Breaks in Textbox

    Try this - adjust the name of the Textbox as required:
    Please Login or Register  to view this content.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Insert Line Breaks in Textbox

    San,
    Can you start your own question please? It's not helpful to have that posted in the middle of a completely different problem!

  7. #7
    Registered User
    Join Date
    04-13-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Insert Line Breaks in Textbox

    thanks! that works perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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