+ Reply to Thread
Results 1 to 4 of 4

Asigning consecutive textbox values to multiple consecutive cells...

  1. #1
    Registered User
    Join Date
    01-25-2016
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    14

    Asigning consecutive textbox values to multiple consecutive cells...

    Hello guys,

    I have the following code:

    Please Login or Register  to view this content.
    What I'm trying to obtain is to copy the textboxes values (each text box value...) into a range of consecutive cells (each Tb into it's appropriate cell...)
    The textboxes are on a UserForm
    I need your help making this loop work correctly.

    Much appreciate your help.
    Octavian

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Asigning consecutive textbox values to multiple consecutive cells...

    Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    01-25-2016
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    14

    Re: Asigning consecutive textbox values to multiple consecutive cells...

    Hi MickG,

    Thank you very much for your feedback. In fact the code you provided is almost there, only one little aspect is missing... I need that the For Each syntax to connect all the TextBoxes with names starting with "D"
    I have multiple textboxes on my UserForm and I've named them with a letter & a number ex: D1, D2, D3,...,Dn (of course I have also others that fallow the same pattern... A1,A2,etc...)
    I will later modify the code in order to link all the "A"-Tb and "B"-Tb, etc.. to different rows / consecutive cells...
    I tried to link them based on their progresive names... On the other hand your code links all of them.
    I've inserted here an img. of my test UserForm to provide better insight.

    UserForm.jpg
    Thanks again for your prompt reply.
    Last edited by Hovoruha Octavian; 02-02-2019 at 06:35 PM.

  4. #4
    Registered User
    Join Date
    01-25-2016
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    14

    Re: Asigning consecutive textbox values to multiple consecutive cells...

    Got it!
    I've modified the IF statement in order to take into account the first letter in the TextBox name. Also added a second variable as Long in order to have the values from the "A" Tb's inserted in the row bellow.

    Please Login or Register  to view this content.
    So everything worked out just fine based on your BASE code.
    Thanks again MickG!!!
    Last edited by Hovoruha Octavian; 02-02-2019 at 06:36 PM.

+ 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. Check cells for consecutive values
    By DemingHelpingHand in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-04-2016, 12:34 PM
  2. Average Ignoring Zero Values - Non-consecutive cells
    By a7mad3wies in forum Excel General
    Replies: 2
    Last Post: 12-05-2013, 02:13 AM
  3. Replies: 1
    Last Post: 05-29-2013, 10:35 AM
  4. [SOLVED] Average for non-consecutive cells, excluding zero values.
    By musik7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2013, 06:11 PM
  5. Replies: 6
    Last Post: 03-23-2012, 06:03 PM
  6. Multiple non consecutive true values for IF function
    By riwiseuse in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 10-19-2010, 02:53 PM
  7. [SOLVED] find the max values for cells in consecutive groups of 600
    By john in forum Excel General
    Replies: 2
    Last Post: 10-04-2005, 06: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