+ Reply to Thread
Results 1 to 3 of 3

VBA Code to find Number of Last Sheet in a Workbook

  1. #1
    Registered User
    Join Date
    03-30-2014
    Location
    Glendale, Arizona
    MS-Off Ver
    Excel 2013
    Posts
    25

    VBA Code to find Number of Last Sheet in a Workbook

    Is there a VBA way to determine the sheet number of the final sheet in a workbook without first selecting that sheet? The code will have to be placed in a separate workbook. The target workbook may have a random number of sheets. The sheet may have a name that is different from the number itself.

  2. #2
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: VBA Code to find Number of Last Sheet in a Workbook

    Will this give you what you want?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-30-2014
    Location
    Glendale, Arizona
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: VBA Code to find Number of Last Sheet in a Workbook

    After adding "NumOfSheets =" at the beginning, it works perfectly. Thank you.

+ 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. VBA Code to find range from Input sheet and hide respective columns in sheet 2.
    By skonduru in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2016, 11:56 AM
  2. 2 Sheets - Input Sheet & Output Sheet - Find unique number and add value to a column
    By bebongtheshark in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-16-2014, 01:23 AM
  3. Replies: 20
    Last Post: 01-11-2014, 05:39 AM
  4. find a formula to autopopulate one workbook sheet to another workbook
    By Aleaghh00 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-06-2013, 03:43 PM
  5. [SOLVED] find code# from sheet 1 on sheet 2, compare value on sheet 1 with value on sheet 2
    By BlakeLee in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-27-2013, 01:52 PM
  6. Find The Same Number on another workbook
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-14-2011, 01:38 PM
  7. Find sheet name in another workbook based on name from one workbook
    By Mordred in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-02-2010, 02:38 PM

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