+ Reply to Thread
Results 1 to 2 of 2

Beginner to VBA, How can I fix this "Runtime error (13) Type Mismatch"

  1. #1
    Registered User
    Join Date
    09-26-2018
    Location
    London, England
    MS-Off Ver
    home and business 2016
    Posts
    2

    Post Beginner to VBA, How can I fix this "Runtime error (13) Type Mismatch"

    Hi All,

    I've spend the last few days bodging my way to this VBA script thanks to a lot of helpful input.

    I'm trying to create a script that auto-updates selected data in around 250 rows in Sheet1. The data is chosen based on the data in sheet2, which is effectively the names of who needs updating along which the data which needs updating (the layout of both sheets aren't the same. Sheet1 contains around 80 pieces of information per person whereas sheet2 only contains around 10 pieces of information per person).

    I believe, thanks to a very helpful reddit user i've almost completed the task but given I didn't write the script itself it's a little out of my league in terms of understanding, I'm still at a very beginner form level.

    So the problem.

    Everytime I run the below scripts I get a Runtime error (13) Type Mismatch for this string of data -
    HTML Code: 


    Class Module: clsEmployee

    HTML Code: 

    Updater Module


    HTML Code: 

    The data it's altering are all standard numbers below 2500.
    The team is representing by a number also.

    It might be quite a simple thing but like I mentioned I'm just starting to learn how to really use VBA and I can't contact the guy who originally helped me. Anyone able to help here?

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: Beginner to VBA, How can I fix this "Runtime error (13) Type Mismatch"

    check your data for a not numeric text in the joinyear wich should be in the column "B" + 7 = "H" i guess
    the expected value is a number
    Please Login or Register  to view this content.
    if this cell is empty it would try to set a "" in a number and then you get a "Runtime error (13) Type Mismatch"

    even a "." can make this happen if your excel has "," as displaying decimal numbers

    a long means a 32bit whole number
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

+ 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. [SOLVED] Code displays error message reading "type mismatch"
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-12-2014, 09:32 AM
  2. Excel 2010 (Run-time error '13' type mismatch) "Debug" and "Continue" Grayed out.
    By Jeronimo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2012, 06:42 PM
  3. [SOLVED] VBA Excel 2007 : Autofit Merge Cells Error "Run-time error '13': Type Mismatch"
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2012, 04:10 PM
  4. Runtime Error "13" Type Mismatch
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-08-2012, 11:09 AM
  5. Replies: 5
    Last Post: 08-08-2010, 03:03 PM
  6. [SOLVED] Merged cells cause "Runtime error 13 type mismatch" problem
    By Ralph Malph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2006, 08:55 AM
  7. Error Handling to mitigate "Run Time Erorr 13 Type Mismatch"
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2005, 09:05 AM

Tags for this Thread

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