+ Reply to Thread
Results 1 to 8 of 8

UserForms, Force user to select from each Listbox, textbox

  1. #1
    Registered User
    Join Date
    03-23-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    3

    UserForms, Force user to select from each Listbox, textbox

    Hi,

    I have an UserForm with mulitiple Listboxes and a couple text boxes. The operator is supposed to select from each listbox and type in at least one textbox, then press a button to execute some code.

    I would like a message box to pop up when a operator didn't select from any of the listboxes. What code am I missing for that?

    Thanks!
    Laura

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: UserForms, Force user to select from each Listbox, textbox

    Laura,

    Something like this should work for you:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: UserForms, Force user to select from each Listbox, textbox

    Attached is an example so you can see how it works
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-02-2012
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: UserForms, Force user to select from each Listbox, textbox

    Is it possible to make the userform go away once the submit button has been pushed?
    Thanks bob

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: UserForms, Force user to select from each Listbox, textbox

    bob,

    Yes, you would just add this line to the bottom of your submit button:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-02-2012
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: UserForms, Force user to select from each Listbox, textbox

    Tigeravatar,
    Worked perfect, Thanks Bob

  7. #7
    Registered User
    Join Date
    03-02-2012
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: UserForms, Force user to select from each Listbox, textbox

    Opps post removed to keep in line with rules.
    Attached Files Attached Files
    Last edited by azland00123; 05-30-2012 at 09:51 AM. Reason: Removed for rule adhearence.

  8. #8
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: UserForms, Force user to select from each Listbox, textbox

    azland00123,

    Please see the forum rules (link in my sig) #2 for why you shouldn't post questions in another user's thread. (I answered last time because it may have been relevant to the original poster's question, and it was simple enough that the answer was 2 words of code.)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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