+ Reply to Thread
Results 1 to 4 of 4

Type mismatch (Error 13)

  1. #1
    Registered User
    Join Date
    10-18-2010
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2007
    Posts
    47

    Type mismatch (Error 13)

    Hello, I have a macro that closes all workbooks except the active one without saving and I would like it to keep the Personal workbook open and hidden. When I run it, I receive the Type Mismatch error message. How can I revise the following code to run without error? The line producing the error is: If Wb.Name <> AWb Or "PERSONAL.XLS" Then. (Very new to VBA... thank you!)

    Please Login or Register  to view this content.
    Last edited by kirsty; 11-25-2010 at 02:33 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Type mismatch (Error 13)

    Try:

    Please Login or Register  to view this content.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-18-2010
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Type mismatch (Error 13)

    Works perfectly. Thank you!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Type mismatch (Error 13)

    You're welcome. Thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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