+ Reply to Thread
Results 1 to 8 of 8

[SOLVED] error 13 type mismatch

  1. #1
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    [SOLVED] error 13 type mismatch

    i had 2 userforms that i combined into 1...i copied a code over and adjust 1 field that had a different name. now i'm getting a runtime error 13 type mismatch and it brings me here:

    Please Login or Register  to view this content.
    original working code here:

    Please Login or Register  to view this content.
    revised code here: i replaced field "billingjob" with "JobSearch"....everything should be the same...all other fields i had kept the same name except for that one.

    Please Login or Register  to view this content.
    can't figure out why i'm getting an error on this?
    Last edited by adamheon; 01-02-2017 at 11:18 PM.

  2. #2
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,230

    Re: error 13 type mismatch

    You should probably dimension st as Variant in case the data isn't found and the COUNTIFS returns an error value
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: error 13 type mismatch

    forgive my ignorance...not sure what you mean exactly?

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,971

    Re: error 13 type mismatch

    You should probably dimension st [sic] as Variant in case the data isn't found and the COUNTIFS returns an error value
    You should probably dimension at as Variant in case the data isn't found and the COUNTIFS returns an error value

    Dim at As Long,....---> Dim at As Variant
    Ben Van Johnson

  5. #5
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: error 13 type mismatch

    got it. still getting the same error in the same spot.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,971

    Re: error 13 type mismatch

    1. What do JobSearchand cmbMonth hold?
    2. Is cmbMonth a month number such as "6" or an name such as June or Jun?
    3. Is column I Excel date values?
    4. What's in column G, strings or numbers?

  7. #7
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: error 13 type mismatch

    Attached is a sample which should have the answers to all your questions. I left both the original userform (frmBillingEntry) and the new combined userform that i have an issue with (frmReviseBilling)
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: error 13 type mismatch

    all set with this. It was just a textbox label that needed to be renamed (year) to (year2). then it all worked. Thanks!

+ 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. Run Type error 13 Type Mismatch
    By Affan Khan in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-13-2012, 12:58 PM
  2. [SOLVED] Type mismatch error: Need help
    By Lui23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2012, 04:50 AM
  3. [SOLVED] Run-type error 13 type mismatch
    By misop in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2012, 04:08 AM
  4. Complile Error: Type Mismatch ??? After adding error trap
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2012, 03:50 PM
  5. Conditional Formatting - Run Time Error '13' Type Mismatch Error
    By ksp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2011, 07:37 PM
  6. Type mismatch error?
    By phillipe124 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2011, 06:37 AM
  7. Type Mismatch Error
    By geepeeone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2009, 02:10 AM
  8. [SOLVED] Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 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