+ Reply to Thread
Results 1 to 2 of 2

Type Mismatch error second time through.

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    18

    Type Mismatch error second time through.

    Hello, I am using the code below to find text in a worksheet then loop through and find the next occurrence until it can't find any new occurrences. But I get a Runtime Error 13; Type Mismatch error when a I run it a second time. It works the first time but generates the error on the second run through the code.

    The type mismatch error occurs at:
    Set currentFind = xlSh.Cells.Find(What:="W2017", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
    False, SearchFormat:=False)




    Please Login or Register  to view this content.
    Last edited by sinski; 10-14-2017 at 01:57 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Type Mismatch error second time through.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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. a different run time 13 type mismatch error
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2014, 03:40 PM
  2. [SOLVED] Run-time error '13': Type mismatch
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 08:56 AM
  3. Run-Time Error '13: Type Mismatch
    By mlegge77 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2013, 04:44 PM
  4. Run-time error 13: Type mismatch
    By gregg141 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2012, 05:22 PM
  5. Type mismatch Run-time Error 13
    By auber in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-27-2009, 10:46 AM
  6. run-time error 13 type mismatch
    By godster84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2007, 11:29 PM
  7. [SOLVED] Run Time Error 13 Type Mismatch
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2005, 08: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