+ Reply to Thread
Results 1 to 4 of 4

Thread: Open at particular sheet every time

  1. #1
    Forum Contributor Grimace's Avatar
    Join Date
    05-04-2009
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2003
    Posts
    165

    Open at particular sheet every time

    Good morning

    I have a workbook with multiple sheets in it, and I am looking for some basic VBA code that ensures the Workbook always opens to a particular sheet every time it is opened, no matter where the person was looking when they last saved the workbook.

    I am sure it will be a basic Workbook Open code, however a few attempts have left me high and dry.

    See attached basic example, where I want it to always open on the "Welcome" tab.

    Thanks
    Darren.
    Attached Files Attached Files
    Last edited by Grimace; 11-23-2011 at 07:36 PM.

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,165

    Re: Open at particular sheet every time

    Try this:
    Private Sub Workbook_Open()
    Sheets(YourSheetName).Select
    End Sub

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Cochrane,Alberta
    MS-Off Ver
    XL 2003,2007,2010
    Posts
    6,843

    Re: Open at particular sheet every time

    You can use the Before close or open event.
    The code goes into the ThisWorkbook Module
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Sheets(1).Select
    MsgBox "Good Bye"
    ActiveWorkbook.Save
    End Sub
    
    Private Sub Workbook_Open()
    Sheets(1).Select
    MsgBox "Welcome"
    End Sub
    Attached Files Attached Files

  4. #4
    Forum Contributor Grimace's Avatar
    Join Date
    05-04-2009
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2003
    Posts
    165

    Re: Open at particular sheet every time

    Thanks to everyone for replying so quickly ... all sorted now.

    Really appreciate your help.

+ 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.2.0