Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whilst agreeing with Charles that your users should be able to handle a copy
or cut correctly, see if this untested code helps. Based on code from the Help example for "CutCopyMode Property". Const RangeNoCut As String = "A1:M500" Dim PreviousRange As Range Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not PreviousRange Is Nothing Then If Not Intersect(PreviousRange, Range(RangeNoCut)) Is Nothing Then Select Case Application.CutCopyMode Case Is = False 'Normal, allow 'MsgBox "Not in Cut or Copy mode" Case Is = xlCopy 'Copy, allow 'MsgBox "In Copy mode" Case Is = xlCut 'Cut, change to copy 'MsgBox "In Cut mode" 'Cancel the Cut Application.CutCopyMode = False 'Now copy the previous range PreviousRange.Copy End Select End If End If Set PreviousRange = Target End Sub "KS" wrote in message ups.com... I have some users that cannot figure out difference between copy and cut. They are always cutting when they should be copying. How can I write a code that anytime, anyway they choose cut it will automatically change it to a copy? They are basically selection some cells in a worksheet & cutting them somewhere else in the worksheet. What they are doing is simple but how can I override their keystrokes to be the correct one? Thanks for any help. KS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE.... max. limit 8 :( | Excel Discussion (Misc queries) | |||
Substitute | Excel Discussion (Misc queries) | |||
More than 7 IF? any substitute? | Excel Worksheet Functions | |||
substitute | Excel Worksheet Functions | |||
using a substitute value | Excel Programming |