+ Reply to Thread
Results 1 to 4 of 4

Runtime error '13'

  1. #1
    Registered User
    Join Date
    07-11-2007
    Posts
    14

    Question Runtime error '13'

    I'm not sure if this is possible, which is probably why I continue to get this error message and my macro does not work correctly.

    I have a macro on a column which when I type in the letters "LB" (no quotes) the macro changes the font color to bright green. For the longest time I have been manually entering the letters "LB", but I now discovered that other data in the row can place the "LB". So I created a formula like this:

    Please Login or Register  to view this content.
    The problem is when I copy and paste the formula to all rows I get a runtime error on the macro, error #13. In addition only some of the rows work correctly. All of them from the formula perspective have LB properly inserted, but they are not highlighted.

    What am I doing wrong?

    Thanks.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Rootball,

    You need to post your macro to get an answer to your question.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    07-11-2007
    Posts
    14
    Here is the macro

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Rootball,

    When writing macros that are to be used as User Defined Functions (UDF), there are a few rules.

    A UDF can...
    1) only return a value to the cell that calls it.

    A UDF can't...
    2) modify or place a value in another cell.
    3) modify the cell's format properties

    Sincerely,
    Leith Ross

+ 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