user access

S

Sathisc

Hi,

currently we are using a shared excel of about 15 people. I want to
give sheet 3 to only 3 users. Is there any way we can share that
particular sheet for only those 3 users.

Many thanks for the help
 
S

Simon Lloyd

Sathisc;338155 said:
Hi,

currently we are using a shared excel of about 15 people. I want to
give sheet 3 to only 3 users. Is there any way we can share that
particular sheet for only those 3 users.

Many thanks for the helpDid i answer your other question satifactory?

This again has to be done with vba, this goes in the worksheet code
module:


*How to Save a Worksheet Event Macro*
1. *Copy* the macro using *CTRL+C* keys.
2. Open your Workbook and *Right Click* on the *Worksheet's Name Tab*
for the Worksheet the macro will run on.
3. *Left Click* on *View Code* in the pop up menu.
4. *Paste* the macro code using *CTRL+V*
5. Make any custom changes to the macro if needed at this time.
6. *Save* the macro in your Workbook using *CTRL+S*



Code:
--------------------
Private Sub Worksheet_Activate()
If Environ("username") <> "Simon" Or Environ("username") <> "Sathsic" Then
MsgBox "You are not authorised to view this sheet"
Sheets("Sheet2").Select
End If
End Sub
--------------------
It looks for the windows logon name, so in this instance mine would be
Simon and yours Sathsic (but naturally it will be our actual PC logon
names), you can just keep extending the terms using OR like i have.


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 
D

Dave Peterson

Sheets live in workbooks/files. If you want to share a single sheet, you'll
have to create a workbook/file with that single sheet.

Personally, I stay away from Shared workbooks (tools|Share workbook). There are
too many things that are disabled. And from I've read, too much chance that of
workbook corruption.

Remember to keep frequent backups.
 
S

Sathisc

Hi Simon,

I have tried giving this code but it is not letting any user in the
sheet. I have given only two id's but both couldnt able to view the
sheet.

Help
 
S

Simon Lloyd

Sathisc;338525 said:
Hi Simon,

I have tried giving this code but it is not letting any user in the
sheet. I have given only two id's but both couldnt able to view the
sheet.

Help
It's nothing to do with YOU giving them "id's" the code picks up the
windows logon - i.e when you start up your PC you have to enter your
username and password (unless its a single user pc and it will just have
your name or a name for the computer as the users name), it is this
username (id or logon whatever you want to call it) that the code is
looking at.

Is this workbook on a network?


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 
Top