+ Reply to Thread
Results 1 to 5 of 5

Excel VBA Run-time error '13' Type mismatch

  1. #1
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Post Excel VBA Run-time error '13' Type mismatch

    Hi I have a macro that can delete rows, I have a problem with my macro because sometimes when I used it I get a Run-time error '13' Type mismatch but sometimes it is working. I don't know why sometimes I get this error, besides I am using almost the same template everytime. It works in some template, and sometimes it doesnt work, Here is my code below. I hope you guys can help me. thank you so much.

    Please Login or Register  to view this content.
    The Error comes in this line

    Please Login or Register  to view this content.
    Last edited by mackypogi; 09-17-2013 at 02:22 AM.

  2. #2
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Excel VBA Run-time error '13' Type mismatch

    May be???
    Please Login or Register  to view this content.
    Regards,
    tt3

  3. #3
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Excel VBA Run-time error '13' Type mismatch

    Hi tuongtu3,

    thanks for the reply, I will try your suggestion and post what will happen. right now I have 2 template, one is the macro works fine, and the other one template is for testing because the macro doesnt works with it/ i get runtime error.

  4. #4
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Excel VBA Run-time error '13' Type mismatch

    Hi tuongtu3,

    It works! the runtime error is gone! but, I have a problem, because the macro can delete in multiple sheet/tab. and the problem is, when I replaced FoundCell to strToDelete, it display all the data that should be deleted in the message box.

    1.PNG

    If you an see the image, GBSOU and SOF01 is the data I enter / data to be delete. the problem is. SOF01 is not listed in OFR_MAINLEG_FCL tab. it is in the other tab I selected.

    this is the second message box,

    2.PNG

    as you can see the gbsou and sof01 is there in message box. which is not correct. because the message box should only display 1 data at a time. i hope you understand what I am saying I am not very good in english
    Last edited by mackypogi; 09-17-2013 at 01:54 AM.

  5. #5
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Excel VBA Run-time error '13' Type mismatch

    Hi tuongtu3,

    I used myStrings(i) and it works fine now. thank you for your reply. it is working fine now.

+ 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. Excel VBA Run-time error '13' Type mismatch
    By pankajpm in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-27-2013, 05:34 AM
  2. Excel VBA Run-time error '13' Type mismatch
    By edgaryp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2013, 06:48 PM
  3. run-time error 13: type mismatch in VBA (Excel 2007)
    By zeno1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2012, 04:38 PM
  4. Excel VBA Frustrating Run-time error '13' Type mismatch
    By shastamccloud in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-08-2010, 02:34 AM
  5. run time error(13) type mismatch in Excel Feed
    By lorneg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2006, 05:40 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