LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 394
Default Lock & Protect Cells With Data

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:D6" 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
 
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
need to lock 5 cells but not protect entire sheet Lock MY Cells Excel Discussion (Misc queries) 2 September 6th 07 07:14 PM
How do I lock unclock cells to protect the data entered? Sandi@hotmail Excel Worksheet Functions 1 March 13th 07 02:46 AM
How do I lock/protect cells so they can't be changed Julie Excel Worksheet Functions 3 November 4th 06 03:49 AM
Protect/Lock Specific Cells srf1030 Excel Discussion (Misc queries) 6 July 6th 05 08:05 PM
Can I use the grouping and lock and protect cells bfisher Excel Discussion (Misc queries) 1 January 11th 05 10:55 PM


All times are GMT +1. The time now is 05:41 AM.

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"