+ Reply to Thread
Results 1 to 10 of 10

Drop down list with pre selected value.

  1. #1
    Registered User
    Join Date
    12-20-2008
    Location
    India
    Posts
    23

    Post Drop down list with pre selected value.

    Hi All,

    My requirement is to implement a drop down list having two values "Yes (Recommended), No", I want the value "Yes (Recommended)" to be default value for all cells on which this validation is put. But also need a message box to be displayed if the user go ahead and select "No" the message box should be like "If you are not certain about this feature please click on 'Cancel' and contact you List Provider." and have 'Ok' and 'Cancel' button on it.

    Please see the attached file for example.

    Thanks for help.
    Attached Files Attached Files
    Last edited by nukecity83; 08-31-2009 at 03:02 AM.

  2. #2
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: Drop down list with pre selected value.

    To solve the problem with the default value for your list simply enter the value that you want "Yes (Reccommended)" in the cell and then use data validation to create a list. Users will be able to select something different if they want.

    Im not sure of exactly how to get a pop up box like you want but i suppose you could use some sort of conditional formatting?

    Hope this helps

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Drop down list with pre selected value.

    It's possible to input window....

    untitled.JPG

    But you can do that for values that aren't on validation list.
    Don't know how to implement it for some values on validation list.

  4. #4
    Registered User
    Join Date
    12-20-2008
    Location
    India
    Posts
    23

    Unhappy Re: Drop down list with pre selected value.

    Quote Originally Posted by zbor View Post
    It's possible to input window....

    Attachment 51557

    But you can do that for values that aren't on validation list.
    Don't know how to implement it for some values on validation list.
    Thanks, but not much of help I need this alert message when No is selected. I am not sure if this can be done using macro.

    Further more help please!

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Drop down list with pre selected value.

    Right-click on the sheet-tab for this sheet and select VIEW CODE.

    Paste in this sheet-event macro code in the window that appears:
    Please Login or Register  to view this content.
    Save your sheet and try changing values in the noted range.

    NOTE: I would find this particularly irritating after awhile, I'm just saying. I might add a cell somewhere where I can indicate I "know" what I'm doing and not get those messages. Maybe like this:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 08-25-2009 at 01:21 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Registered User
    Join Date
    12-20-2008
    Location
    India
    Posts
    23

    Post Re: Drop down list with pre selected value.

    Quote Originally Posted by JBeaucaire View Post
    Right-click on the sheet-tab for this sheet and select VIEW CODE.

    Paste in this sheet-event macro code in the window that appears:
    Please Login or Register  to view this content.
    Save your sheet and try changing values in the noted range.

    NOTE: I would find this particularly irritating after awhile, I'm just saying. I might add a cell somewhere where I can indicate I "know" what I'm doing and not get those messages. Maybe like this:

    Please Login or Register  to view this content.
    This code looks fine, but I am facing an issue with this code, If I select a Few places with 'No' and at some time later I try clearing it by hitting delete key, I am getting "Runtime error 13 - Type Mismatch"

    Whats wrong I dont know..

    Help please.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Drop down list with pre selected value.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-20-2008
    Location
    India
    Posts
    23

    Smile Re: Drop down list with pre selected value.

    Quote Originally Posted by JBeaucaire View Post
    Please Login or Register  to view this content.
    This looks perfect but could you help me on the Critical warning message, the message box is coming like a critical warning and not as a simple message box!

    Thanks.

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Drop down list with pre selected value.

    Take out the vbCritical reference, then.

  10. #10
    Registered User
    Join Date
    12-20-2008
    Location
    India
    Posts
    23

    Thumbs up Re: Drop down list with pre selected value.

    Quote Originally Posted by JBeaucaire View Post
    Take out the vbCritical reference, then.
    Thanks a ton for all your help! I have closed this post Cheers!

+ 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