+ Reply to Thread
Results 1 to 4 of 4

simple problem with drop down list. need solution

  1. #1
    Registered User
    Join Date
    06-25-2009
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    76

    simple problem with drop down list. need solution

    I have created a list named "test" which I have used as the drop down list for a column named Title in my excel. The drop down values are Mr., Mrs.

    The problem with Excel is that if the user copy-pastes data onto this cell, Excel does not throw error rather it accepts that value.

    I want to know how it's possible through VBA or excel features to avoid copy-pasting of non-list values on to the cells which have drop down list.

    Note: I am looking for a solution where you the list values (Mr., Mrs. here) are not hardcoded into the code. Reson being I want a generic solution which I can use for other lists, and in case there are changes to the list value I do not want to go to VBA editor and change the code.

    Thanks!
    Last edited by singhabhijitkumar; 06-17-2011 at 05:48 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: simple problem with drop down list. need solution

    Have a look here: http://j-walk.com/ss/excel/tips/tip98.htm

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    06-25-2009
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: simple problem with drop down list. need solution

    Thanks! it works. However, I am looking for a more generic solution where all the columns with drop downs are automatically covered
    Last edited by singhabhijitkumar; 06-17-2011 at 06:20 AM.

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: simple problem with drop down list. need solution

    Works fine for me. The code needs to go on your worksheet's code page.

    Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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