+ Reply to Thread
Results 1 to 4 of 4

Error 13, type mismatch from code.

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Error 13, type mismatch from code.

    Im trying to add the code in bold to the following List Box click code, but I'm getting run time error 13, type mismatch.
    Before it just referenced column H, but I would like it to reference both column H and J to find a match.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Error 13, type mismatch from code.

    You forgot part of the new test:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,879

    Re: Error 13, type mismatch from code.

    Check
    Please Login or Register  to view this content.
    OR (the same with AND) shall be between two boolean values

    if you want to check if a is equal to any of 3 values b,c,d write:
    a=b or a=c or a=d

    not like in spoken language
    a = b or c or d

  4. #4
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Error 13, type mismatch from code.

    Thank you both.

+ 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. VBA Code Run-time Error 13 - Type mismatch
    By jmancha in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-16-2013, 11:15 AM
  2. [SOLVED] Type Mismatch error ==> do some code before exiting sub
    By drawing.blanks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2012, 10:42 PM
  3. type mismatch error in form code
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2010, 02:25 PM
  4. type mismatch error in code
    By strikeofdawn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2008, 08:34 PM
  5. [SOLVED] Type Mismatch error in VBA code
    By bobby in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2005, 04:10 AM

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