Worksheet tax link to user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am setting up a shared Excel document for a group. Each member of the
group will have an individual worksheet identified on the worksheet tab by
their initials.

How do I set up the workbook so when a user opens it, it will go directly to
that user's assigned worksheet?
 
First, you should not need a bookmark. Without a bookmark, the document
should simply open at the beginning.

How are you creating your hyperlink? Are you using the worksheet function
=HYPERLINK("link path","Some Friendly Phrase To Display")
or are you choosing text existing in a cell and using Insert | Hyperlink?

Regardless, try using the HYPERLINK() worksheet function just to easily and
quickly test things. You could set one up like:
=HYPERLINK("c:\my documents\glitchedWordFile.doc","Open Glitched Word File")
you can also use a path using network path if you're on a network (works for
everyone better) as:
=HYPERLINK("\\our-server\share\WordDocs\glitchedWordFile.doc","Open Glitched
Word File")

About that error message: are you certain it was an error message? If so,
can you give us more exact wording? There is also possibility that it's just
a security warning message saying "hey, sometimes it's not so safe to just go
merrily clicking random hyperlinks - still wanna roll the dice?" or something
like that <g>.
 
Try putting this code in the workbook's _Open() event handler. To do so,
open the workbook, then right-click on the Excel icon right next to the word
File in the standard menu and choose [View Code] from the list. copy the
code below and paste it into the module shown to you and close the VB Editor.
Close the workbook and see how it works.

Essentially it's looking for the name of a sheet in the workbook, not
necessarily true initials, but you don't have to tell the users that. It is
not case sensitive, so JLL is same as jll, is same as Jll, etc. If you
mistype it, it gives you infinite chances to get it right, but if you leave
it empty, it will close the workbook.

Private Sub Workbook_Open()
Dim userInitials As String
Do While userInitials = ""
userInitials = InputBox("Enter your user Initials:", "To Continue...", "")
If userInitials = "" Then
ThisWorkbook.Close ' bye bye!
End If
On Error Resume Next
Worksheets(userInitials).Activate
If Err <> 0 Then
Err.Clear
MsgBox "Those are not valid initials"
userInitials = ""
On Error GoTo 0
End If
On Error GoTo 0
Loop
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top