#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Shared workbook

I have a spreadsheet that is shared between 8 people on a network. Is it
possible to protect this so that each person only sees the parts of the
worksheet that is relevant to them, but have the whole thing available to
the administrator?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Shared workbook

Note: the following is contingent upon users enabling macros.

If they don't only the "Dummy" sheet will be visible.

I assume you are on a network(LAN) with users logging into the system.

I would set it up so that whichever user's login name is flagged, all sheets
except that user would be hidden.

No password to open the workbook, just code to make a user's sheet visible.

In the Thisworkbook Module....................

Private Sub Workbook_Open()
Dim pword As String
Select Case Environ("Username")
'if a login is not used change to
'pword = InputBox("Enter Your Password")
'Select Case pword
Case Is = "Gord": Sheets("Gordsheet").Visible = True
Sheets("Dummy").Visible = False
Case Is = "Pete": Sheets("Petesheet").Visible = True
Sheets("Dummy").Visible = False
End Select
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim sht As Worksheet
Application.ScreenUpdating = False
Sheets("Dummy").Visible = xlSheetVisible
For Each sht In ActiveWorkbook.Sheets
If sht.Name < "Dummy" Then
sht.Visible = xlSheetVeryHidden
End If
Next sht
Application.ScreenUpdating = True
ThisWorkbook.Save
End Sub

To allow you to see all sheets and edit them.

In a general module...............

Sub UnHideAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Visible = True
Next n
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Fri, 07 Sep 2007 23:12:45 GMT, "Steveqae"
wrote:

I have a spreadsheet that is shared between 8 people on a network. Is it
possible to protect this so that each person only sees the parts of the
worksheet that is relevant to them, but have the whole thing available to
the administrator?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared workbook Sandie Excel Worksheet Functions 0 May 23rd 07 07:05 PM
Printing viewing a shared workbook on a shared drive aloomba Excel Discussion (Misc queries) 0 April 13th 07 02:52 PM
update pivot in shared shared workbook 00George00 Excel Discussion (Misc queries) 1 August 23rd 06 08:16 PM
Shared Workbook mtc13 Excel Discussion (Misc queries) 2 October 26th 05 01:34 PM
Shared workbook Trish Lockhart Excel Discussion (Misc queries) 0 April 12th 05 07:02 PM


All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"