+ Reply to Thread
Results 1 to 7 of 7

Select First Sheet in Workbook

  1. #1
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Select First Sheet in Workbook

    Hi,

    I want to have a simple macro that will select the first Worksheet, no matter what it's called.

    The simple command
    Please Login or Register  to view this content.
    won't work if the name of the first sheet has been renamed to something other than Sheet1.

    Thanks.

    Paul.
    Last edited by EdWoods; 10-15-2013 at 10:28 PM.

  2. #2
    Forum Contributor
    Join Date
    03-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    154

    Re: Select First Sheet in Workbook

    hi,

    try:

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

  3. #3
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Select First Sheet in Workbook

    Awesome. Thanks for that.

    Now, how about selecting the last sheet (no matter how many there are, or what they're called?

    Thanks.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Select First Sheet in Workbook

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Select First Sheet in Workbook

    Awesome! Any one last one (I promise). How do I count how many sheets there are?

    Cheers.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,291

    Re: Select First Sheet in Workbook

    Sheets.Count
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Select First Sheet in Workbook

    Ah, great. I was using Sheet.Count (without the "s") and wondering why it wouldn't work!

    Excel Forum to the rescue again! Thanks.

+ 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. To select a workbook using sheet name
    By vpnvipin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2012, 08:07 AM
  2. Drop down box to select a sheet in the workbook?
    By Plasma in forum Excel General
    Replies: 2
    Last Post: 04-12-2006, 02:28 PM
  3. [SOLVED] Select sheet tabs in workbook & save to separate workbook files
    By stratocaster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2006, 11:40 AM
  4. Use of Sheet CodeNames to Select Sheet in Different Workbook
    By Randy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-14-2005, 12:05 AM
  5. Replies: 1
    Last Post: 06-09-2005, 08:05 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