+ Reply to Thread
Results 1 to 6 of 6

Runtime Error Type 13 Mismatch

  1. #1
    Linking to specific cells in pivot table
    Guest

    Runtime Error Type 13 Mismatch

    Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch" error
    when they execute a macro on a spreadsheet I created. Any idea on why this
    was created and how I might be able to correct this issue?

    Thanks,

    Robert

  2. #2
    Chip Pearson
    Guest

    Re: Runtime Error Type 13 Mismatch

    A type mismatch occurs when you try to assign incompatible data
    to a variable. For example

    Dim L As Long
    L = "a"

    will cause a type mismatch error because a numerical data type (L
    As Long) cannot hold string data ("a").

    It is impossible to diagnose your problem without seeing the
    code. When the error occurs, have the client click the Debug
    button (assuming the VBA Project is not protected), rather than
    the End button. This will cause VBA to display the offending line
    of code.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "Linking to specific cells in pivot table"
    <[email protected]>
    wrote in message
    news:[email protected]...
    > Hi - A client of mine is getting the "Runtime Error Type 13
    > Mismatch" error
    > when they execute a macro on a spreadsheet I created. Any idea
    > on why this
    > was created and how I might be able to correct this issue?
    >
    > Thanks,
    >
    > Robert




  3. #3
    Bob Phillips
    Guest

    Re: Runtime Error Type 13 Mismatch

    Not without seeing the code.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Linking to specific cells in pivot table"
    <[email protected]> wrote in
    message news:[email protected]...
    > Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch"

    error
    > when they execute a macro on a spreadsheet I created. Any idea on why

    this
    > was created and how I might be able to correct this issue?
    >
    > Thanks,
    >
    > Robert




  4. #4
    Jeff Standen
    Guest

    Re: Runtime Error Type 13 Mismatch

    I think that's actually "Runtime Error 13: Type Mismatch" - it means you are
    trying to use a variable of a particular type (eg integer) in something that
    is expecting a different type (eg string). It should break on the line where
    the error is assuming the project isn't protected so you should be able to
    pick out what's causing the problem.

    Jeff

    "Linking to specific cells in pivot table"
    <[email protected]> wrote in
    message news:[email protected]...
    > Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch"
    > error
    > when they execute a macro on a spreadsheet I created. Any idea on why
    > this
    > was created and how I might be able to correct this issue?
    >
    > Thanks,
    >
    > Robert




  5. #5

    Re: Runtime Error Type 13 Mismatch

    Almost impossible to answer - if we could see the code it might help,
    but (for example) are they expected to input a date in a particular
    cell referenced by the macro, or numeric values - in either case, has
    data validation been used on these cells because if not, sure as eggs
    are eggs, they'll enter dates with full stops when that isn't a valid
    seperator, or type the value as a text string - and the macro will then
    give a type mismatch.


    Linking to specific cells in pivot table wrote:
    > Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch" error
    > when they execute a macro on a spreadsheet I created. Any idea on why this
    > was created and how I might be able to correct this issue?
    >
    > Thanks,
    >
    > Robert



  6. #6
    Tom Ogilvy
    Guest

    Re: Runtime Error Type 13 Mismatch

    You have several good explanations of what a type mismatch error is.

    Here is a guess:

    Is the client using xl97?

    in Excel 97, if the activecell (as an example) contains a text value and you
    do

    if activecell.Value = 3 then

    you will get a type mismatch error.

    It is much more sensative to this situation than later versions.

    --
    Regards,
    Tom Ogilvy



    "Linking to specific cells in pivot table"
    <[email protected]> wrote in
    message news:[email protected]...
    > Hi - A client of mine is getting the "Runtime Error Type 13 Mismatch"

    error
    > when they execute a macro on a spreadsheet I created. Any idea on why

    this
    > was created and how I might be able to correct this issue?
    >
    > Thanks,
    >
    > Robert




+ 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