+ Reply to Thread
Results 1 to 9 of 9

Run-type error 13 type mismatch

  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    Bratislava
    MS-Off Ver
    Excel 2010
    Posts
    47

    Run-type error 13 type mismatch

    Hello,

    I am getting error Run type error 13 type mismatch in this code on line If FName = False Then

    Please Login or Register  to view this content.
    Can someone help me?
    Last edited by misop; 06-05-2012 at 04:10 AM.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Run-type error 13 type mismatch

    I can't see where you would get an error in this code. Where do you get it?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    11-09-2011
    Location
    Bratislava
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Run-type error 13 type mismatch

    edited first post, thanks for remark

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Run-type error 13 type mismatch

    I still don't see how you would get an error there. If you click the cancel button, i will return a value of false for "FName"??? Are you using option explicit?

  5. #5
    Registered User
    Join Date
    11-09-2011
    Location
    Bratislava
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Run-type error 13 type mismatch

    I am using this:

    Option Explicit
    Dim FName As String
    Dim lrow As Long

    Right if you hit button Cancel, it will pop up som msgbox

  6. #6
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: Run-type error 13 type mismatch

    If i declare FName as integer i get a error 13.
    Are you declaring FName somewhere, and if so, what type of variable are you giving FName?

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Run-type error 13 type mismatch

    change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  8. #8
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Run-type error 13 type mismatch

    It would be helpful if you post the whole code next time. As JosephP has pointed out, that should sort you error problem out.

  9. #9
    Registered User
    Join Date
    11-09-2011
    Location
    Bratislava
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Run-type error 13 type mismatch

    Thanks,

    this solve my problem:

    Please Login or Register  to view this content.

+ 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