+ Reply to Thread
Results 1 to 4 of 4

Create additional userforms/fields based on users input

  1. #1
    Registered User
    Join Date
    09-29-2016
    Location
    Edmond, OK
    MS-Off Ver
    2010
    Posts
    16

    Create additional userforms/fields based on users input

    I have a basic userform setup already that has contact info, etc. On one of the inputs, I am asking for a number of locations. Depending on this answer, likely 1-10, I want the user to then be taken to a second userform based on the number of locations input into form 1. If for instance, the user says 6 in this field, after hitting submit, I want the user to be taken to a form to fill out information for Location 1, then a form for Location 2, and so on until they are finished filling out the number of locations they specified.

    I need all of that information posted into my worksheet in the specific sections with the same name (Location 1, 2, etc.)

    How would I accomplish this task? I'm a noob to Excel, so go easy on me. I just figured out how to build a userform and have it post to the correct areas in my worksheet this morning.

    On the other hand, if it's simpler, I could have the number of Location fields populate in the first userform based on the number chosen, so that it would all be one simple form, the length of which would change based on the input of # of locations. Either way, I could use some assistance.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Create additional userforms/fields based on users input

    An alternative method would be to provide a single large Locations field and ask them to input the locations either comma separated or one per line, then SPLIT the output and allocate that way.

    My personal view is thats more of an elegant solution (and a lot easier to develop).

    heres an example, enter locations hitting Ctrl+Enter to move to a new line between each one
    Attached Files Attached Files
    Last edited by pjwhitfield; 09-30-2016 at 08:31 AM.
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Create additional userforms/fields based on users input

    Another alternative would be to provide a listbox (ListBox1 in the below code) that lists all of the locations. There would also be a text box (txtLocationEntry) for the user to edit the selected location or add a new one if the user selected the <new location> item from the list. An OK button (butOK) would apply their changes.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mikerickson; 09-30-2016 at 09:08 AM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    09-29-2016
    Location
    Edmond, OK
    MS-Off Ver
    2010
    Posts
    16

    Re: Create additional userforms/fields based on users input

    Here's an image that hopefully helps explain my situation further:

    my issue.jpg

+ 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. Replies: 1
    Last Post: 06-13-2016, 11:45 AM
  2. [SOLVED] Add additional days/weeks/months based on user input
    By pauldaddyadams in forum Excel General
    Replies: 3
    Last Post: 12-09-2015, 01:29 PM
  3. Replies: 2
    Last Post: 01-10-2014, 12:22 PM
  4. Additional input Boxes, based on answer to first input box
    By DrBball7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2013, 05:38 AM
  5. Create additional tabs automatically based on input from master sheet
    By davidshluger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2010, 12:02 PM
  6. [SOLVED] create template with certain fields to input information only
    By Annette in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2006, 11:00 AM
  7. using an input box to allow users type in the differnt fields name
    By ryll in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2005, 10:20 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