+ Reply to Thread
Results 1 to 6 of 6

Run time error 13 Type mismatch error

  1. #1
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Run time error 13 Type mismatch error

    i have modified but still i am getting this type of error but i different line Please struck here

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Run time error 13 Type mismatch error

    Start with proper declarations.
    To enforce them use
    Please Login or Register  to view this content.
    In your case the problem appears (is visible) because (undefined) variable frac is empty.

    By the way: this makes me a bit curious:
    Please Login or Register  to view this content.
    You can delete these 2 lines and the code would work exactly as with them.
    Best Regards,

    Kaper

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Run time error 13 Type mismatch error

    Copy your commandbutton 1_Click code without Sub and End Sub lines and paste it into a new module. And then debug the code and you will know that why is this producing error.
    While I did the same, I found that i is not initialized, arr is empty, dash, frac...etc., all your variables are empty, and thus the statement Left(CStr(Evaluate(frac)), 5) produces an error. Then what will the code do then and definitely produce an error.

    To know what values are being allotted to the variables, put a msgbox to show the value of a variable below each statement to know what value it holds after the statement is executed.

    I hope this helps.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Run time error 13 Type mismatch error

    Hi, baig123,

    you´ve been notified about why not to crosspost and to post the links - it seems you do not care!


    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...e-error13.html
    http://www.mrexcel.com/forum/excel-q...rror-13-a.html

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: Run time error 13 Type mismatch error

    i have deleted 2 lines but i am getting same error

    i have created module3 imy sheet i have copied this code

    Please Login or Register  to view this content.
    Last edited by baig123; 06-24-2014 at 08:13 AM.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Run time error 13 Type mismatch error

    @baig123
    Have you noticed what HaHoBe has said in post#4?
    I think you really don't care about what the senior members advise you not to do. You haven't spoken a single word regarding that. This is not good at all.
    We all are here to help each other and we must respect the senior members and follow the rules set by the forum.
    I hope you understand.

+ 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-Time error '13': Type mismatch
    By Stevo56 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2014, 11:06 AM
  2. [SOLVED] run-time error '13' Type Mismatch error
    By Blake 7 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-16-2012, 08:59 AM
  3. [SOLVED] VBA Excel 2007 : Autofit Merge Cells Error "Run-time error '13': Type Mismatch"
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2012, 04:10 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. run-time error 13 type mismatch
    By godster84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2007, 11:29 PM

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