sharing excel sheet with multiple users, but other users cant see

L

lana.b

hello,
i'm working in project managment department, my Colleagues controls
different types of project, for example person1 controls the tourism sector
projects, person2 controls agriculture projects, etc..
so i want to share an excel document with multiple users, which everyone
fills only the information concerned with his sector. meanwhile user1 cant
modify user2's document but at the end i need to have a master document that
reflects all the data from these documents.
for more clarification, when user1 fills the required feilds. and user2
fills also it will directly reflect to my master document, but user1 cant see
user2.
 
E

Eduardo

Hi,
In a similar situation what I did I create different tabs for each user to
enter the information then in each tab I right click in the mouse, view code
and copy this


Private Sub Worksheet_Activate()
Dim strPassword As String
On Error Resume Next
Me.Protect Password:="MANAGER"
Me.Columns.Hidden = True

strPassword = InputBox("Enter password to access DATA sheet")

If strPassword = "" Then
ActiveSheet.Visible = False
Worksheets("Menu").Select
Exit Sub
ElseIf strPassword <> "MANAGER" Then
MsgBox "Password Incorrect "
ActiveSheet.Visible = False
Worksheets("Menu").Select
Exit Sub
Else
Me.Unprotect Password:="MANAGER"
Me.Columns.Hidden = False
End If
Range("a1").Select

On Error GoTo 0
End Sub

Private Sub Worksheet_Deactivate()
On Error Resume Next
Me.Columns.Hidden = True
On Error GoTo 0
End Sub

Then create a button in a Menu tab for the user to go to their tab to enter
the information, when hitting the button it will ask for the password you
enter in the above code in my example MANAGER. that will prevent other users
to modify or enter information in the wrong tab. Don't forget to protect your
VBA , the password is in the code
 
L

lana.b

Dear Eduardo
refering to ur code, why if i entered a wrong password the sheet
disappeared, and in the menu tab when i add a button shall i put the same code
 

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

Top