+ Reply to Thread
Results 1 to 3 of 3

Macro error - 1004 Happens Randomly - Using Evaluate

  1. #1
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Macro error - 1004 Happens Randomly - Using Evaluate

    Hello,

    I have a macro that is run by multiple people.The macro runs perfectly fine for me, however, sometimes the other people running the macro get a 1004 error stating "Unable to get the evaluate property of the Worksheet class". I am stumped what is causing this. It is taking a column of names... some in all CAPS, some in all lower case, some in proper case and making them all proper case....

    The section of code that sometimes gives the error is:

    Please Login or Register  to view this content.

    I can post the rest of the code if nessecarry, however, this is the only line that ever has an issue.
    Last edited by Dulanic; 08-19-2010 at 11:39 AM. Reason: solved

  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

    Re: Macro error - 1004 Happens Randomly

    Try this:
    Please Login or Register  to view this content.
    Clamping the range reduces the extents, getting the reference style accommodates people who use R1C1 references, and getting an external address serves in lieu of r.Parent.Evaluate (or r.Worksheet.Evaluate).
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: Macro error - 1004 Happens Randomly - Using Evaluate

    Perfect! I tried that myself and with another person and it worked flawlessly. Also, it was MUCH faster when dealing with 6000+ cells. That is definitely a similar yet very different approach. I don't quite follow how that worked, but I will dig into it a bit more to get an understanding of that.

+ 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