+ Reply to Thread
Results 1 to 5 of 5

Complile Error: Type Mismatch ??? After adding error trap

  1. #1
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Question Complile Error: Type Mismatch ??? After adding error trap

    So this was my code and it worked just fine.

    Please Login or Register  to view this content.

    I wanted to error trap for when the find command doesnt find anything - so I changed my code to this and now it doesnt work. I get an COMPLILE ERROR: TYPE MISMATCH. What does that mean?
    Please Login or Register  to view this content.
    All I changed was:
    Please Login or Register  to view this content.
    Last edited by clemsoncooz; 02-22-2012 at 03:50 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Complile Error: Type Mismatch ??? After adding error trap

    You've declared the variable as a Long (an ordinary scalar variable type) but are comparing it to Nothing, which is reserved to object variables.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: Complile Error: Type Mismatch ??? After adding error trap

    Thanks shg.

    So how do I fix this?

    Please excuse my ignorance. Still learning.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Complile Error: Type Mismatch ??? After adding error trap

    Just guessing,

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: Complile Error: Type Mismatch ??? After adding error trap

    That I do believe is working perfectly!

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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