Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
How do I shrink an xlsx file after cutting a big data worksheet? smoore716 New Users to Excel 1 October 29th 09 10:11 PM
Cutting Rows from one Worksheet to another based on a value Edwyn Excel Discussion (Misc queries) 0 October 20th 06 12:11 PM
protect sheets against cutting / pasting UllidIreland Excel Worksheet Functions 1 June 6th 06 05:39 PM
Worksheet lines cutting off on the right HT New Users to Excel 2 July 7th 05 05:24 PM
protect worksheet against cutting ties[_3_] Excel Programming 0 November 30th 04 04:56 PM


All times are GMT +1. The time now is 11:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"