Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a shortcut to one sheet of a workbook

Status
Not open for further replies.

HaworthBantam

Programmer
Jan 31, 2002
132
GB
I have an Excel workbook on a server containing numerous sheets.

I'd like to make one of the sheets available to everyone within the office but not have the others visible.

Is it possible to create a desktop shortcut that links to only a single Excel sheet within a workbook ?

Thanks.
 
Couldn't you link the data you want into a seperate workbook, and use the new workbook as the shortcut?

Regards,

Ian
 
Assuming that the worksheet the users are allowed to is named "Sheet3", enter the following code into your Workbook_Open event:

Code:
Private Sub Workbook_Open()
Dim sh As Worksheet
If InputBox(&quot;Please Enter the Administrator Password&quot;, &quot;Password&quot;) <> &quot;Your Password&quot; Then
    For Each sh In ThisWorkbook.Worksheets
        If sh.Name <> &quot;Sheet3&quot; Then
            sh.Visible = xlSheetVeryHidden
        End If
    Next sh
Else
    For Each sh In ThisWorkbook.Worksheets
        sh.Visible = True
    Next sh
End If
End Sub

This allows you to control who sees all of the sheets or not. Only users who know the password will be able to view all of the sheets, if they don't know the password they will only see Sheet3.

Hope this helps!



If you can't be &quot;The Best&quot;, be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top