+ Reply to Thread
Results 1 to 4 of 4

Range.Validation Add Fails with 1004 error

  1. #1
    Registered User
    Join Date
    01-13-2009
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    8

    Question Range.Validation Add Fails with 1004 error

    Hi,

    I have a strange problem with my Excel Macro.
    I am using the following code in the Worksheet Change event routine:


    Please Login or Register  to view this content.
    The purpose of this code is to assign a data validation of type list to a cell.

    The code is working just fine when it is activated from the Worksheet Change event routine. However, when I am copying this exact code to a regular routine (that is part of a Module) - I get the following error:

    Run time error 1004: Application-defined or object-defined error.

    What do I do wrong???!!!!

    Please help!

    p.s. I am using Excel 2007
    Last edited by Hila; 01-14-2009 at 08:50 AM. Reason: add code tag as requested

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Please take a few minutes to read the forum rules, then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-13-2009
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    8
    Code tag added. Thank you

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    There must be a named range EmptyList

+ 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