+ Reply to Thread
Results 1 to 11 of 11

runtime error 13 type mismatch

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    runtime error 13 type mismatch

    Hi Folks
    I'm using the code below and it seems to be working ok, However in the event I right click and delete a row I get a runtime error 13 type mismatch, can anyone suggest a solution.
    Thanks
    Please Login or Register  to view this content.
    Last edited by jimcuk; 04-24-2016 at 06:56 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: runtime error 13 type mismatch

    Hi,

    Unfortunately your post does not comply with Rule 3 of our Forum
    RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: runtime error 13 type mismatch

    Sorry Richard
    Done

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: runtime error 13 type mismatch

    Hi,

    Any chance you can upload the workbook, anonymised if necessary so that we can see the problem in context?

  5. #5
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: runtime error 13 type mismatch

    Here you go Richard, I am noting the error has occurred at other times s well so I have broken something
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: runtime error 13 type mismatch

    Can you clarify what actions you take which results in the runtime error.

    I'm assuming it's the Trailer_costs sheet that's active when this happens. I find that right clicking a row and selecting delete puts Excel into what seems a loop of some sort with much screen flashing. I needed to use task manager to close Excel.

  7. #7
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: runtime error 13 type mismatch

    Yes it's the trailer cost sheet

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: runtime error 13 type mismatch

    ...and what actions do you take? Please give clear details since as I say I encounter a runaway loop problem but not an error message.

  9. #9
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: runtime error 13 type mismatch

    Hi Richard
    I am also getting the runaway loop now, Initially I was selecting the drop down in the off hire column the vba msg box would appear I select yes, it would successfully move the row to the off hire sheet then the error would appear indicating this line
    Please Login or Register  to view this content.
    at fault

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: runtime error 13 type mismatch

    Quote Originally Posted by jimcuk View Post
    Hi Richard
    I am also getting the runaway loop now, Initially I was selecting the drop down in the off hire column the vba msg box would appear I select yes, it would successfully move the row to the off hire sheet then the error would appear indicating this line
    Please Login or Register  to view this content.
    at fault
    Hi,

    This is slightly different to your original post in which you mentioned right clicking and deleting a row.

    Right clicking a row and deleting a row of course causes the target address to be the whole row, i.e. all 16000+ columns. There is no intersection with column M in this case, hence the loop that process the upper case statement is invoked. So it's not actually a runaway ad infinitum but still takes a long time.

    In getting the variable LR you're using the empty column A which always returns the value 1 which doesn't sound right.

    I still can't get the error message though.

  11. #11
    Registered User
    Join Date
    10-14-2013
    Location
    uk
    MS-Off Ver
    2016
    Posts
    87

    Re: runtime error 13 type mismatch

    Hi Richard, Thanks for your patience.
    I have deleted the zoom code and the code to change to upper case, to simplify it, and I am no longer getting the error or loop, I suspect when I added the code I messed it up.
    The issue I have now is it seems to be copying to the off hire page and overwriting the previous row, instead of appending it to the next empty row can youu help with this
    amended sheet attached.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Type Mismatch Runtime Error 13
    By EXCELBENCH in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-21-2015, 05:06 PM
  2. [SOLVED] Runtime Error 13 type mismatch
    By Gauravsinghp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2014, 06:29 AM
  3. Runtime Error 13 type mismatch
    By Gauravsinghp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2014, 06:23 AM
  4. Type Mismatch Runtime Error
    By Jaeger in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2014, 10:49 AM
  5. runtime error 13 type mismatch
    By hughesy8290 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2013, 11:18 AM
  6. RunTime Error 13 and Type Mismatch...
    By TheNewGuy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2010, 09:24 AM
  7. runtime error 13 type mismatch
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2009, 11:15 PM

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