+ Reply to Thread
Results 1 to 3 of 3

code to open/close userform based on if a list box contains list items or not

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    code to open/close userform based on if a list box contains list items or not

    Im looking for some command button code to check the list values of the list box SerialNumber. If the list for the list box has no values then it unloads the userform. However if it has one or more values in the list then it shows the user form EmptyRecordDelete instead.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: code to open/close userform based on if a list box contains list items or not

    Try something like this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: code to open/close userform based on if a list box contains list items or not

    That did it, thank you.

+ 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. UserForm help - display list of open workbooks except workbook userform code is in
    By kensweep in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-09-2014, 12:26 PM
  2. [SOLVED] Counting Occurrences of Items in a List Based on Separate List Values
    By wheel1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2013, 01:04 PM
  3. Deselect items in list box on userform
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-15-2012, 12:21 PM
  4. [SOLVED] Creating a grocery list in a new worksheet based on selected items in a master list
    By jacolli4 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2012, 07:53 AM
  5. Create a list of items based on another list
    By rickyg in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-10-2010, 09:57 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