+ Reply to Thread
Results 1 to 2 of 2

Exit Sub if Activeworkbook not xlsx

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Exit Sub if Activeworkbook not xlsx

    Working on a macro and looking to add a line in the beginning that if the activeworkbook does not have an xlsx extension then to exit the sub. Any ideas? Thanks.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Exit Sub if Activeworkbook not xlsx

    Try this...

    If Right(ActiveWorkbook.Name, 4) <> "xlsx" Then Exit Sub

+ 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