Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Only allow users to edit in sheet, not delete any entries entered

Is there a way to protect data in Excel so users can enter information but
not delete information that has been entered by other users in the cell. In
other words, I'll be distributing a document for users to edit, I want to
protect it so users who have entered data, cannot have someone else delete
what they entered. Any easy way to do this?

Thanks for your time.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default Only allow users to edit in sheet, not delete any entries entered

You can use a Worksheet_Change event macro that will prevent ANY entry other
than a blank cell from being changed. Something like the following. Note
that this macro must be placed in the sheet module of the pertinent sheet.
HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CountAfter As Long
If Target.Count 1 Then
CountAfter = Application.CountA(Target)
Application.EnableEvents = False
If CountAfter = 0 Then
Application.Undo
MsgBox "Clearing of cells is not permitted.", 16, "ERROR"
End If
Application.EnableEvents = True
Exit Sub
End If
If IsEmpty(Target.Value) Then
Application.EnableEvents = False
Application.Undo
MsgBox "Clearing of cells is not permitted.", 16, "ERROR"
Application.EnableEvents = True
End If
End Sub
"rrupp" wrote in message
...
Is there a way to protect data in Excel so users can enter information but
not delete information that has been entered by other users in the cell.
In
other words, I'll be distributing a document for users to edit, I want to
protect it so users who have entered data, cannot have someone else delete
what they entered. Any easy way to do this?

Thanks for your time.



  #3   Report Post  
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by Otto Moehrbach[_2_] View Post
You can use a Worksheet_Change event macro that will prevent ANY entry other
than a blank cell from being changed. Something like the following. Note
that this macro must be placed in the sheet module of the pertinent sheet.
HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CountAfter As Long
If Target.Count 1 Then
CountAfter = Application.CountA(Target)
Application.EnableEvents = False
If CountAfter = 0 Then
Application.Undo
MsgBox "Clearing of cells is not permitted.", 16, "ERROR"
End If
Application.EnableEvents = True
Exit Sub
End If
If IsEmpty(Target.Value) Then
Application.EnableEvents = False
Application.Undo
MsgBox "Clearing of cells is not permitted.", 16, "ERROR"
Application.EnableEvents = True
End If
End Sub
"rrupp" wrote in message
...
Is there a way to protect data in Excel so users can enter information but
not delete information that has been entered by other users in the cell.
In
other words, I'll be distributing a document for users to edit, I want to
protect it so users who have entered data, cannot have someone else delete
what they entered. Any easy way to do this?

Thanks for your time.

Can you explain how to run this macro? I have the same problem but I did put the code and nothing happens.
Thanks.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Only allow users to edit in sheet, not delete any entries entered

Thank you very much!

"rrupp" wrote:

Is there a way to protect data in Excel so users can enter information but
not delete information that has been entered by other users in the cell. In
other words, I'll be distributing a document for users to edit, I want to
protect it so users who have entered data, cannot have someone else delete
what they entered. Any easy way to do this?

Thanks for your time.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default Only allow users to edit in sheet, not delete any entries entered

Thanks for the feedback. Otto
"rrupp" wrote in message
...
Thank you very much!

"rrupp" wrote:

Is there a way to protect data in Excel so users can enter information
but
not delete information that has been entered by other users in the cell.
In
other words, I'll be distributing a document for users to edit, I want to
protect it so users who have entered data, cannot have someone else
delete
what they entered. Any easy way to do this?

Thanks for your time.





Reply
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
sharing excel sheet with multiple users, but other users cant see lana.b Excel Discussion (Misc queries) 3 January 25th 09 11:15 AM
Using Tabs within the allow users to edit range while sheet protec Jess Excel Worksheet Functions 0 July 3rd 08 05:14 AM
How do I Delete Sheet when it won't light up in the Edit menu? CFP Excel Worksheet Functions 2 December 2nd 05 01:41 AM
Excel-comments entered by users disappear in a shared excel-sheet Damholdt Excel Worksheet Functions 1 October 26th 05 11:31 AM
How do I prevent users to delete a worksheet, but allow to edit? [email protected] Excel Discussion (Misc queries) 2 September 1st 05 08:37 PM


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