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: 15
Default Data Entry and Protection

On Feb 20, 3:10 am, Ken Johnson wrote:
Maybe something like this...

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheet1.Unprotect "tiptoe"
Dim rgCell As Range
For Each rgCell In Range("B2:C11")
If rgCell.Value = "" Then
rgCell.Locked = False
Else: rgCell.Locked = True
End If
Next
Sheet1.Protect "tiptoe"
End Sub

When the workbook is saved each cell in the range of cells where data
is to be entered by all the different other users (Sheet1!B2:C11 in
the sample code) is locked if not blank and unlocked if blank. The
sheet is protected with the password "tiptoe"

The code has to be pasted into the ThisWorkbook code module.

Ken Johnson


Ken,
Thanks, looking good.

Regards,
tiptoe
 
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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing [email protected] Excel Discussion (Misc queries) 0 March 20th 08 12:45 PM
Cell Entry That Locks Selected Cells From Any Data Entry. ron Excel Worksheet Functions 5 February 16th 07 09:52 PM
Auto Date with Manual Entry Protection JBallance Excel Worksheet Functions 1 September 23rd 06 02:47 AM


All times are GMT +1. The time now is 04:11 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"