+ Reply to Thread
Results 1 to 3 of 3

Type Mismatch Error 13

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    57

    Type Mismatch Error 13

    Hello,

    I am using this code
    Please Login or Register  to view this content.
    And the area marked is giving me a type mismatch. Not sure why. I've tried changing it to these:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Both give me the same error. I use this in another sub and it works just fine:
    Please Login or Register  to view this content.
    What it does: This code moves through a range and checks to see if the value in Column A is ANF or JNF, and if it is, it presents a message box.

    if anyone could point out a mistake I've made somewhere in there (that is the full sub) I would appreciate it.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: Type Mismatch Error 13

    You dont need the WITH statment. Excel understands what sheet you are in.

    BT2 is not boolean, you must compare it everytime

    NOT: If Cel.Value = BT1 Or BT2 Then
    BUT: If Cel.Value = BT1 Or Cel.Value = BT2 Then

  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Type Mismatch Error 13

    Ah... I knew it was something simple. Thanks! I will need the with statement later, I figured I should just start with it instead of going back.

+ 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] Run-type error 13 type mismatch
    By misop in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2012, 04:08 AM
  3. 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
  4. 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
  5. 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