+ Reply to Thread
Results 1 to 5 of 5

Require a specific textbox to be filled only if a specific answer from a listbox is chosen

  1. #1
    Registered User
    Join Date
    08-25-2014
    Location
    london
    MS-Off Ver
    ms office 2007
    Posts
    2

    Require a specific textbox to be filled only if a specific answer from a listbox is chosen

    so i have a listbox right now and it has 5 choices. I want a textbox to require an answer but ONLY IF certain choices from the said listbox is chosen as an answer.

    example:
    Listbox is about favorite color, and choices are:
    1. Red
    2. Orange
    3. Yellow
    4. Green
    5. Others

    If the user chooses either 'Orange' or 'Others', a textbox should require the user to fill it up - a message box should appear; otherwise, if choices 'Red', 'Yellow', and 'Green' are selected, the textbox does NOT prompt the user to answer it.

    ***i am very sorry, i forgot to mention that this is a userform from excel.
    Last edited by bearygump; 08-26-2014 at 11:59 AM.

  2. #2
    Registered User
    Join Date
    08-19-2014
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    2010
    Posts
    45

    Re: Require a specific textbox to be filled only if a specific answer from a listbox is ch

    You want an inputbox to appear, right?
    This should work"
    Please Login or Register  to view this content.


    *Add reputation if this was helpful.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,530

    Re: Require a specific textbox to be filled only if a specific answer from a listbox is ch

    Jamie.Reis has provided a method that prompts the user for a value immediately when the listbox selection is made. This method also needs code to assign the user input to the textbox. For example (code not tested; I would be happy to test if you attach your file):

    Please Login or Register  to view this content.
    Another method would be to check the textbox at the point where the data is accepted, for example, when pressing a Save button.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    08-25-2014
    Location
    london
    MS-Off Ver
    ms office 2007
    Posts
    2

    Re: Require a specific textbox to be filled only if a specific answer from a listbox is ch

    i can upload the file, but can you teach me how? sorry, im really new to forum things, and all these things

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,530

    Re: Require a specific textbox to be filled only if a specific answer from a listbox is ch

    Here are step-by-step instructions with screen shots.

    To post a file:
    1. Under the text box where you type your reply click the Go Advanced button.
    2. In the next screen look above the reply box and click the "paper clip" icon. You will get a pop-up screen.
    3. In the pop-up, click Add then Select to select a file from your local drive
    4. Click the Upload button to upload the file
    5. Click Done to attach it.

    It will be displayed as an attachment underneath your post text. Alternatively as the last step you can click the Insert Inline button and a hyperlink to the file will be inserted directly into your post text in the spot where your cursor is set at the moment you click the button.

+ 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. Exact result when s specific Item is chosen
    By managingcrap in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2014, 12:46 AM
  2. Exact result when s specific Item is chosen
    By managingcrap in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2014, 01:46 PM
  3. [SOLVED] Vlookup in UserForm - Get Input from listbox, Lookup in specific table from specific sheet
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2013, 09:00 AM
  4. [SOLVED] Form items chosen in Listbox to populate specific cells in spreadsheet
    By floydian in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2013, 07:48 AM
  5. Replies: 22
    Last Post: 06-02-2012, 11:45 AM

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