+ Reply to Thread
Results 1 to 4 of 4

Placing the data from a range of cells into a userform textbox

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Placing the data from a range of cells into a userform textbox

    I got to me missing something idiotic here for I have been string at this computer too long and my eyes and brain are all crossed...

    I accumulate information into a growing range of rows two columns wide. I want to take that range of information and copy it into a textbox on a userform that pops up at the end of a sub.

    Do I have to loop through all the rows (not many) and add each pair of columns to a growing string variable separated by & vbCRLF &, to place it in bulk into the textbox, or is there a simpler way?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,521

    Re: Placing the data from a range of cells into a userform textbox

    Have a look at Join and see if that works for you.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Re: Placing the data from a range of cells into a userform textbox

    Thank-you (once again!), it worked well. The only problem I am running into now is that while vbCRLF works fine in a message box, it simply shows as a paragraph symbol without providing a carraige-return:line feed in a text box. Wonder why that is...

    Edit: Ah HA! The multiline property!!!

    All is great!
    Last edited by brucemc777; 06-30-2014 at 10:59 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,521

    Re: Placing the data from a range of cells into a userform textbox

    You're welcome. Thanks for the rep.

+ 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. Populate a textbox on Userform with data from a filtered range using VBA
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2014, 04:20 AM
  2. Replies: 4
    Last Post: 01-29-2014, 05:53 AM
  3. [SOLVED] Saving textbox data from a userform to Sheet2 cells...
    By goldbeje in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-04-2012, 04:32 PM
  4. UserForm textbox data to empty cells
    By RLWells in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2012, 02:42 AM
  5. Copying userform data in textbox into cells
    By dowinterfor6 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-21-2011, 02:10 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