+ Reply to Thread
Results 1 to 4 of 4

Change cell value when validation list is changed

  1. #1
    Registered User
    Join Date
    05-17-2010
    Location
    kent, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Change cell value when validation list is changed

    Hi. I have a cell that has a validation list. When i select a value from the list, i want the value of another cell to change automatically but it isnt working.
    The list source is pointing to another sheet:
    =INDIRECT("DB_DAT!$J$268:$J$275")

    Please Login or Register  to view this content.
    I get an error when it tries to change the cell value. Its error no. 1004.

  2. #2
    Registered User
    Join Date
    01-21-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Change cell value when validation list is changed

    Try changing the Range("X4") to Range("X4").Value.

  3. #3
    Registered User
    Join Date
    05-17-2010
    Location
    kent, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Change cell value when validation list is changed

    It makes no difference. The code works fine when it is fired after a cell without validation is updated.
    It only throws an error when the worksheet_change event is triggered when selecting a value from the drop down list.

  4. #4
    Registered User
    Join Date
    01-21-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Change cell value when validation list is changed

    Using two different versions of the code, the Worksheet_Change event appears to be working correctly, so the next part would be to look at the information that populates the Data Validation drop down list. For my test, I created a drop down using a named range, since I do not have the same list that you do. With each change, mine is working correctly. The only thing that I can suggest is the verify the validation list and its settings. There may be something in its setup that is throwing the error. If you comment out the EnableEvents and test, are you able to choose Debug when the error is thrown? Does that point to anything?

+ 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. Replies: 21
    Last Post: 03-14-2013, 07:33 AM
  2. Change Validation list given the text in another cell
    By spoursy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-07-2012, 11:35 AM
  3. [SOLVED] Reset dependant validation list when the previous validation list is changed.
    By Rimmu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2012, 09:23 AM
  4. [SOLVED] How can the font in the Data Validation list be changed?
    By Pat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2006, 11:00 PM
  5. monitor cell that uses data validation list for change
    By rgarber50 in forum Excel General
    Replies: 2
    Last Post: 08-01-2005, 01:15 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