+ Reply to Thread
Results 1 to 6 of 6

How to delete multiple lines in a textbox with a command button?

  1. #1
    Registered User
    Join Date
    12-26-2019
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    69

    How to delete multiple lines in a textbox with a command button?

    Hi everyone,
    This is probably an easy one for you but I am struggling to find a solution.
    I have a textbox in a userform which has some text in it. If I press a button I wish to delete the first 6 lines and move the text below up.
    How can I achieve that?

    Thanks a lot for any help you can provide.
    Last edited by Pepe Le Mokko; 01-05-2020 at 03:58 AM. Reason: Remove unnecessary title part

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Need vba code: How to delete multiple lines in a textbox with a command button?

    .
    This might get you started in the right direction :

    https://stackoverflow.com/questions/...xtbox-by-lines

  3. #3
    Registered User
    Join Date
    12-26-2019
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    69

    Re: Need vba code: How to delete multiple lines in a textbox with a command button?

    Hi, thank you. I tried it out but it's not what I am looking for. Is there an easier approach?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Need vba code: How to delete multiple lines in a textbox with a command button?

    Quote Originally Posted by frankytheman View Post
    If I press a button I wish to delete the first 6 lines and move the text below up.
    Try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-26-2019
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    69

    Re: Need vba code: How to delete multiple lines in a textbox with a command button?

    OMG, thank you so much Jindon. This solved my issue. You are a star.

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to delete multiple lines in a textbox with a command button?

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] VBA Form 'Delete' Command Button Code Ammendment
    By davo3286 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2018, 08:29 AM
  2. [SOLVED] Help on VBA code to delete a row in more than one table from a single command button
    By grahamlees in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2017, 05:46 AM
  3. Userform Command Button Caption (multiple lines & different font size)
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2017, 05:08 PM
  4. VBA code to create command button. Print all sheets then delete command button.
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2015, 05:18 PM
  5. [SOLVED] Userform: Code for DELETE on a command button
    By Gal403 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2014, 01:28 AM
  6. Command Button to update the multiple line items in a TextBox
    By aaron.mendes in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-18-2013, 10:21 AM
  7. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 PM

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