+ Reply to Thread
Results 1 to 3 of 3

How to format text out of a VBA text box.

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    Tennessee
    MS-Off Ver
    Excel 2010
    Posts
    3

    How to format text out of a VBA text box.

    Hello,

    I have created a VBA form with a number of combo, text, and check boxes. In one of my text boxes, I have the user enter data separated by commas. Example: Demand Planning, Supply Planning, Finance, Marketing. In my code to populate the text box entry into the worksheet, I would like the text to be re-formatted as:
    >Demand Planning
    >Supply Planning
    >Finance
    >Marketing
    in other words adding the arrow where there is a comma and putting the text on a new line in the cell.

    Any thoughts on how best to go about this?

    Thanks so much for your help!!

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: How to format text out of a VBA text box.

    I would probably use the split command....it will split the string into an array by the delimiter, comma in this case. then you can loop throught array and add a > to your number in each cell.....HTH
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: How to format text out of a VBA text box.

    Hi,

    Please Login or Register  to view this content.
    Regards

+ 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