+ Reply to Thread
Results 1 to 4 of 4

open workbook in a specified worksheet

  1. #1
    Registered User
    Join Date
    03-27-2005
    Posts
    59

    open workbook in a specified worksheet

    does any body know the code to open a workbook in a specified worksheet regardless of what worsheet you close on thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello short_n_curly,

    Could you post an example of what you want to happen on the worksheet?

    Thanks,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-27-2005
    Posts
    59
    the workbook has about 15 worksheets and can be closed on anyone of them but when the workbook opens i wish it to open specifically on a workshhet called schedule can you help

    i imagine it is something like

    private sub workbook_open()

    worksheets("Schedule").active

    but i dont know where to place the code or even if it is correct

    can it be done without code even

    thanks for the reply

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Short_n_Curly,

    Your code is correct. You need to place the code in your workbook's Workbook_Open() Event. Open the Visual Basic Editor (press Alt + F11). Look on the left side of screen. You will see a window below the menu. It should have Blue caption that reads "Project - VBA Project". There will be a tree view listing of "objects". You should see an object called "ThisWorkbook". Double left click it. On your right you will see the code window with a line at the top "Private Sub Workbook_Open()". Paste the code into this window between the top and bottom lines. Click Save. You will have to close your workbook and reopen it for this code to execute. When it reopens, this may a take a few seconds, it will activate the sheet.

    If you have any problems, let me know
    Leith Ross

+ 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