+ Reply to Thread
Results 1 to 3 of 3

Set .List if there is nothing to choose.

  1. #1
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Set .List if there is nothing to choose.

    I have this script so a user can choose a list. But sometime there is nog choice. How can i set a value if there is noting to choose?

    Please Login or Register  to view this content.
    Does not work gives a .value error.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,009

    Re: Set .List if there is nothing to choose.

    Try:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,313

    Re: Set .List if there is nothing to choose.

    the combobox listindex will be -1, so use this to either directly exit the sub or trigger a message box informing no data available
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

+ 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. [SOLVED] Choose to List Box
    By Chandria in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-17-2017, 12:08 AM
  2. Need help with a choose from a list formula
    By afe5026 in forum Excel General
    Replies: 2
    Last Post: 10-03-2014, 06:33 PM
  3. [SOLVED] choose names from a list
    By jimboryan in forum Excel General
    Replies: 13
    Last Post: 05-25-2014, 11:20 PM
  4. [SOLVED] Create a list according what i choose in A1!
    By apla in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2013, 10:39 AM
  5. formula to choose list
    By bloo7997 in forum Excel General
    Replies: 1
    Last Post: 10-26-2012, 12:52 PM
  6. Replies: 1
    Last Post: 05-17-2011, 08:44 PM
  7. Choose from List
    By NNothard in forum Excel General
    Replies: 4
    Last Post: 10-09-2006, 11:53 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