+ Reply to Thread
Results 1 to 12 of 12

runtime error 13 type mismatch

  1. #1
    Registered User
    Join Date
    01-30-2009
    Location
    Zwolle, the Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    runtime error 13 type mismatch

    Hi,

    I seem to have some type mismatch in my macro...
    The error appears every time i insert or delete a row in the worksheet.

    This is the code:
    Please Login or Register  to view this content.

    Error is in the line: If Target.Address = "$B$25" And Target.Value <> "" Then

    Anyone with a suggestion?
    Last edited by royUK; 01-30-2009 at 08:28 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: runtime error 13 type mismatch

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    As this is your first post I will add them, but you must read the forum rules before posting again.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: runtime error 13 type mismatch

    You need to delete this lines,
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-30-2009
    Location
    Zwolle, the Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: runtime error 13 type mismatch

    That doesn't seem to make any difference.

    As it is still pointing out the mismatch in:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-30-2009
    Location
    Zwolle, the Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: runtime error 13 type mismatch

    ... Funny thing is, the error only appears when I insert of delete a row....

  6. #6
    Registered User
    Join Date
    01-30-2009
    Location
    Zwolle, the Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: runtime error 13 type mismatch

    yeahaaa

    found a solution...
    just cut the errors by disabling the errors like this:

    Please Login or Register  to view this content.
    cheerio!

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: runtime error 13 type mismatch

    That's not a solution, that's ignoring the errors.

  8. #8
    Registered User
    Join Date
    01-30-2009
    Location
    Zwolle, the Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: runtime error 13 type mismatch

    Sorry true.. therefore found another REAL solution:

    Please Login or Register  to view this content.
    Added the code:
    Please Login or Register  to view this content.
    Because Target.Value is targeted at one cell.
    This code prevents that.

    Cheerio!

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: runtime error 13 type mismatch

    That's better, you must have been selecting several cells.

  10. #10
    Registered User
    Join Date
    01-30-2009
    Location
    Zwolle, the Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: runtime error 13 type mismatch

    Yep that's it, when selecting a row on the left side you automatically select multiple cells (all cells horizontal on that row).

    So this solution helps indeed.

    Thanks for your replies.

  11. #11
    Registered User
    Join Date
    08-30-2012
    Location
    Chandler, AZ
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: runtime error 13 type mismatch

    Hi, i get the same runtime error in my VBA macro. My code is below. now the funny thing is if I delete "StartInsTime" my code runs, but if I include it i get the runtime error. Any clues on how to resolve this?

    Please Login or Register  to view this content.
    Last edited by dp1; 08-30-2012 at 09:58 PM. Reason: tags

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: runtime error 13 type mismatch

    Hello dp1, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

+ 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