+ Reply to Thread
Results 1 to 4 of 4

Copy data from multiple txtboxes without listing name of each box in code

  1. #1
    Registered User
    Join Date
    11-27-2014
    Location
    Birmingham, England
    MS-Off Ver
    Office 2010
    Posts
    9

    Copy data from multiple txtboxes without listing name of each box in code

    Hi All,

    I have 5 userforms with hundreds of textboxes. The name i have given for each textbox already appears as a column heading in the wksheet where the data has to go. One way of transferring the data is to write out the name of each textbox in the code and refer it to the specific cell. As I have so many boxes this is going to take forever. Is there anyway of sending the data from each textbox to a particular cell if the textbox name, matches the column name.

    Thanking you for time.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: Copy data from multiple txtboxes without listing name of each box in code

    Quote Originally Posted by Isaaq View Post
    I have 5 userforms with hundreds of textboxes.
    Ouch.

    Is there anyway of sending the data from each textbox to a particular cell if the textbox name, matches the column name.
    Assuming a range variable, rng, that refers to the column headers, and a row variable, lngRow, that indicates which row to output to, something like this in the userform:

    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Copy data from multiple txtboxes without listing name of each box in code

    you should be able to make use of the controls collection of the userform

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    11-27-2014
    Location
    Birmingham, England
    MS-Off Ver
    Office 2010
    Posts
    9

    Re: Copy data from multiple txtboxes without listing name of each box in code

    Thanks fellas

+ 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] Listing data from multiple worksheets
    By scottcts in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 05:05 PM
  2. Listing data from multiple worksheets
    By scottcts in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  3. Listing data from multiple worksheets
    By David Billigmeier in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  4. Listing data from multiple worksheets
    By David Billigmeier in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 06:05 AM
  5. Listing data from multiple worksheets
    By scottcts in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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