P
Paul Black
Hi Everyone,
I have 6 Users who Input Data ( in a Shared Workbook ) in their OWN
Worksheet. Each Worksheet is Protected ( So they can ONLY Select
Unlocked Cells ) with a Password and ALL Cells are Locked Except for
the Range "C4:H6" ( These are the ONLY Cells in which Data can be
Entered by the User ).
They will Enter Data ( Numeric ) in Cells "C4:C6" for Period 1, they
MUST be Able to Amend the Data if Necessary. When they are Happy with
the Results they will Save the File.
What I would like is that when they Open the File to Input Data for
Period 2 in Cells "D4
6" they CANNOT Change the Data Already Entered
for Period 1, and the Same for the Rest of the Periods.
Is there a way to "Lock" the Cells that are > " " ( Blank OR Empty )
so that they CANNOT be Changed.
There is a Button Called "Finished" that they Click to Hide their
Worksheet Before Saving the File, Perhaps the Code to "Lock" the Cells
could be Added to that.
The Code Behind the Finished Button for Group 1 is :-
Sub Group_1_Finished()
UserName = Sheets("Login & Logoff").Cells(2, 3)
Password = Sheets("Login & Logoff").Cells(3, 3)
If UserName = "Group 1" And Password = "Group 1 Password" Then
Sheets("Group 1").Visible = xlVeryHidden
Range("C3") = ""
Else
Range("C3") = ""
MsgBox "The Group 1 Password You Have Entered Is Invalid, Please Try
Again.", _
vbCritical, "Invalid Group 1 Password"
End If
End Sub
Thanks in Advance
All the Best
Paul
I have 6 Users who Input Data ( in a Shared Workbook ) in their OWN
Worksheet. Each Worksheet is Protected ( So they can ONLY Select
Unlocked Cells ) with a Password and ALL Cells are Locked Except for
the Range "C4:H6" ( These are the ONLY Cells in which Data can be
Entered by the User ).
They will Enter Data ( Numeric ) in Cells "C4:C6" for Period 1, they
MUST be Able to Amend the Data if Necessary. When they are Happy with
the Results they will Save the File.
What I would like is that when they Open the File to Input Data for
Period 2 in Cells "D4
6" they CANNOT Change the Data Already Enteredfor Period 1, and the Same for the Rest of the Periods.
Is there a way to "Lock" the Cells that are > " " ( Blank OR Empty )
so that they CANNOT be Changed.
There is a Button Called "Finished" that they Click to Hide their
Worksheet Before Saving the File, Perhaps the Code to "Lock" the Cells
could be Added to that.
The Code Behind the Finished Button for Group 1 is :-
Sub Group_1_Finished()
UserName = Sheets("Login & Logoff").Cells(2, 3)
Password = Sheets("Login & Logoff").Cells(3, 3)
If UserName = "Group 1" And Password = "Group 1 Password" Then
Sheets("Group 1").Visible = xlVeryHidden
Range("C3") = ""
Else
Range("C3") = ""
MsgBox "The Group 1 Password You Have Entered Is Invalid, Please Try
Again.", _
vbCritical, "Invalid Group 1 Password"
End If
End Sub
Thanks in Advance
All the Best
Paul