+ Reply to Thread
Results 1 to 4 of 4

see whether a range variable is nothing ;error13 - type mismatch

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    see whether a range variable is nothing ;error13 - type mismatch

    Hi,

    prolly very simple question:

    whats wrong with this code:

    Please Login or Register  to view this content.
    it works for the first 2 loops, then it gives me error13 - type mismatch.

    I can avoid the problem by doing it like this:

    Please Login or Register  to view this content.
    But I'd really like to know how to do it the proper way.
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: see whether a range variable is nothing ;error13 - type mismatch

    Please upload the workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-16-2012
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: see whether a range variable is nothing ;error13 - type mismatch

    On which line is it that the error occurs, (debug the code and see exactly what line it fails on).

    Also, you have rAbsence.Select , which is not good code to be having anyway, but then you don't even use the selection in the code. Although if this is just for viewing purposes during debugging, i guess, i'll let you off.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: see whether a range variable is nothing ;error13 - type mismatch

    Shouldn't it be something like this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

+ 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