+ Reply to Thread
Results 1 to 9 of 9

RunTime Error 13 and Type Mismatch...

  1. #1
    Forum Contributor
    Join Date
    06-01-2009
    Location
    Cincinatti,Ohio
    MS-Off Ver
    Excel 2003
    Posts
    122

    RunTime Error 13 and Type Mismatch...

    Hello, I have a LARGE workbook that I have made with a lot of help from this forum and it has been working great until recently when I made some changes to it. Now I get this error,
    Please Login or Register  to view this content.
    when trying to show some of the userforms. What is weird is it worked fine and I don't think I changed anything that would have affected it. I don't know where to start on this one so any help would be really appreciated.
    thanks for your time.

    EDIT: The Problem was solved By fixing Problems in the initialize script as suggested later in the thread.
    Is it possible that there is an error in Range("B24"), or Range("G40") ?
    For example "#DIV/0", this would return error 13
    Thanks for everyone's help.
    Last edited by TheNewGuy; 08-24-2010 at 09:49 AM.

  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: Unknown Problem...?

    You can use an error message as a thread title, you cannot use "Unkown Problem"

    Please change it.

    After you do that, you should look in the Initlaize event code for the problematic form.

    If it happens randomly on multiple forms, you might run CodeCleaner on the workbook.

    http://www.appspro.com/Utilities/CodeCleaner.htm
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    06-01-2009
    Location
    Cincinatti,Ohio
    MS-Off Ver
    Excel 2003
    Posts
    122

    re: RunTime Error 13 and Type Mismatch...

    Thank you for your help. I will try both suggestions and post back.
    Also, I have corrected the title. Sorry about that, I know better, I just wasn't thinking.Thanks again for your help.

  4. #4
    Forum Contributor
    Join Date
    06-01-2009
    Location
    Cincinatti,Ohio
    MS-Off Ver
    Excel 2003
    Posts
    122

    re: RunTime Error 13 and Type Mismatch...

    So how do I run the code cleaner?

  5. #5
    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: RunTime Error 13 and Type Mismatch...

    Tools > Clean Project

  6. #6
    Forum Contributor
    Join Date
    06-01-2009
    Location
    Cincinatti,Ohio
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: RunTime Error 13 and Type Mismatch...

    OK....Thanks. I got that working, and checked the initialize script, it is were the error are happening, but still no luck.. It is giving me that same error at different places if I just comment out the offending lines, it continues on to a new place that gives the same run "time error 13 Type Mismatch" ... but the lines Highlighted by the VBA editor are:
    Please Login or Register  to view this content.
    as I said this line worked fine before... and there is no mismatch of variables, S_Polishing_Type is defined as a public variable and set to Boolean.
    Thanks again for your help. This one has me stumped.

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: RunTime Error 13 and Type Mismatch...

    What is 'bookname' and are there error values in either of the 2 mentioned cells?
    Remember what the dormouse said
    Feed your head

  8. #8
    Forum Contributor
    Join Date
    06-01-2009
    Location
    Cincinatti,Ohio
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: RunTime Error 13 and Type Mismatch...

    well bookname, is the name of the workbook....But you were right it was the cells, they were being loaded with N/A for some reason and that is what was causing the problem. Thank you very much for your help! I would have never figured that out, because originally it was stopping on a different line that gave me nothing to go on. Once I started looking over the Initialize event code real good I found it. Now why did this just start I wonder? Thanks again.

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: RunTime Error 13 and Type Mismatch...

    Is it possible that there is an error in Range("B24"), or Range("G40") ?
    For example "#DIV/0", this would return error 13

    [EDIT]
    Sorry romperstomper I didn't see your post, nor the reply.
    Last edited by Marcol; 08-24-2010 at 09:28 AM. Reason: Late again!!!

+ 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