+ Reply to Thread
Results 1 to 4 of 4

If the dropdown only has one option, have it selected/shown automatically

  1. #1
    Registered User
    Join Date
    01-21-2016
    Location
    knoxville, tennessee
    MS-Off Ver
    2010
    Posts
    10

    If the dropdown only has one option, have it selected/shown automatically

    Does anyone know how to do this in VBA? I believe it would be something similar to the following that I found online:

    Please Login or Register  to view this content.
    How could I adjust this code so that the sole option in the dropdowns is automatically shown/selected? I tried to adjust this code, but it didn't work as I do not understand the range and index elements.

    Please help.
    Last edited by FDibbins; 02-03-2016 at 08:16 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: If the dropdown only has one option, have it selected/shown automatically

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    (I have added them for you - this time)

    Another option would be to adjust any formulas that would reference the DD, so that if the DD is empty, the formula defaults to whatever value you need
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-21-2016
    Location
    knoxville, tennessee
    MS-Off Ver
    2010
    Posts
    10

    Re: If the dropdown only has one option, have it selected/shown automatically

    Sorry about the tags.

    In regards to your suggestion, I do not have any formulas that reference the DDs. I don't know how to write one, and I'm not sure that that would work?

    Thanks for you comments!

  4. #4
    Registered User
    Join Date
    01-21-2016
    Location
    knoxville, tennessee
    MS-Off Ver
    2010
    Posts
    10

    Re: If the dropdown only has one option, have it selected/shown automatically

    can anybody help me?

+ 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] Automatically check box once name selected from dropdown list in a userform
    By coach.32 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2013, 12:38 AM
  2. Activate Print option with a userform where selected Sheet check box option available..
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2013, 08:19 AM
  3. Replies: 0
    Last Post: 07-25-2012, 11:22 AM
  4. Replies: 1
    Last Post: 07-16-2012, 10:42 PM
  5. Replies: 1
    Last Post: 07-10-2012, 05:16 AM
  6. Automatically set all CURRENCY format to only one selected in one dropdown list
    By jasonofshanghai in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2012, 08:42 AM
  7. Replies: 2
    Last Post: 08-11-2011, 01:32 AM
  8. Replies: 3
    Last Post: 05-09-2011, 04:56 PM

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