+ Reply to Thread
Results 1 to 2 of 2

Multiple worksheets - opening options

  1. #1
    Registered User
    Join Date
    02-06-2007
    Posts
    3

    Multiple worksheets - opening options

    Hi there.

    I have a spreadsheet that has multiple worksheets relating to various members of staff.

    While not essential it would be nice if, when each user opened the spreadsheet, it would immediately open that individuals' sheet.

    I imagine that there is a clever bit of VB that recognises the users personal logon username to define what tab to open the sheet on, but as a complete novice I don't know where to start.

    If anyone knows how this can be done, I will be very grateful.

    Thanks!

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    First, create a list of network user IDs and the sheet that "belongs" to that person. For this example, here is my list:
    Please Login or Register  to view this content.
    For this example, the list is on the sheet named Sheet1. The User Names are in column A (column 1) and the Sheet Names are in column B (column 2). Here is the code.

    Please Login or Register  to view this content.
    If you know nothing at all about the Visual Basic Editor, then do the following:
    0. save a back-up copy of your workbook
    1. close all other workbooks
    2 press Alt + F11; this opens the Visual Basic Editor
    3. press Ctrl + R; this ensures that the project explorer window is open
    4. find something that says VBAProject, with the name of your workbook ni parenthesis next to it.
    5. under that, if you see any [+], click them to expand the view
    6. find the object named "ThisWorkbook"
    7. right-click on ThisWorkbook and select "View Code" from the context menu
    8. paste the code above where the cursor is flashing

+ 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