Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
protect worksheet against cutting
I don't think you'll be able to do this.
Anything that I would do would involve a macro, and if macros are disabled (or even if events are disabled), then your code wouldn't be able to run. I'm betting that the users are messing up range names? This is a feable attempt to stop cutting--but it may be sufficient. Rightclick on the worksheet tab that should have this behavior and select view code. Paste this into that codewindow: Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Application If .CutCopyMode = xlCut Then .CutCopyMode = False End If End With End Sub If they cut something (on that same worksheet) and then move to another cell (on that same worksheet), then the Cut is killed. ties wrote: Hi, I would like to protect some of the worksheets so that users can't cut a portion out of it. They should however still be able to copy. Can anybody help to achieve this? Regards, Thijs van Bon -- Dave Peterson |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
protect worksheet against cutting
Thanks Dave,
This works quite ok! Regards, Thijs "Dave Peterson" schreef in bericht ... I don't think you'll be able to do this. Anything that I would do would involve a macro, and if macros are disabled (or even if events are disabled), then your code wouldn't be able to run. I'm betting that the users are messing up range names? This is a feable attempt to stop cutting--but it may be sufficient. Rightclick on the worksheet tab that should have this behavior and select view code. Paste this into that codewindow: Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Application If .CutCopyMode = xlCut Then .CutCopyMode = False End If End With End Sub If they cut something (on that same worksheet) and then move to another cell (on that same worksheet), then the Cut is killed. ties wrote: Hi, I would like to protect some of the worksheets so that users can't cut a portion out of it. They should however still be able to copy. Can anybody help to achieve this? Regards, Thijs van Bon -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I shrink an xlsx file after cutting a big data worksheet? | New Users to Excel | |||
Cutting Rows from one Worksheet to another based on a value | Excel Discussion (Misc queries) | |||
protect sheets against cutting / pasting | Excel Worksheet Functions | |||
Worksheet lines cutting off on the right | New Users to Excel | |||
protect worksheet against cutting | Excel Programming |