J
Joe HM
Hello -
I have the following code in my Worksheet_Change() function. It was
actually taken from the Excel Help (2003/11.# SP1) ...
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Target.Row > 4 And (Target.Column = 3 Or Target.Column =
4)) Then
Select Case Application.CutCopyMode
Case Is = xlCopy
MsgBox "In Copy mode"
Case Is = xlCut
MsgBox "In Cut mode"
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
Application.CutCopyMode = False
Case Is = False
MsgBox "Not in Cut or Copy mode"
End Select
End if
End Sub
I am trying to only allow a cut/paste into certain cells. This works
fine for the copy/paste (xlCopy) but it is not working for the xlCut.
When I go to the Worksheet and do a Cut and then paste it somewhere
else, it tells me "Not in Cut or Copy mode".
Is there a bug in Excel or am I doing something wrong? As I said, it
works for the copy/paste.
Thanks!
Joe
I have the following code in my Worksheet_Change() function. It was
actually taken from the Excel Help (2003/11.# SP1) ...
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Target.Row > 4 And (Target.Column = 3 Or Target.Column =
4)) Then
Select Case Application.CutCopyMode
Case Is = xlCopy
MsgBox "In Copy mode"
Case Is = xlCut
MsgBox "In Cut mode"
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
Application.CutCopyMode = False
Case Is = False
MsgBox "Not in Cut or Copy mode"
End Select
End if
End Sub
I am trying to only allow a cut/paste into certain cells. This works
fine for the copy/paste (xlCopy) but it is not working for the xlCut.
When I go to the Worksheet and do a Cut and then paste it somewhere
else, it tells me "Not in Cut or Copy mode".
Is there a bug in Excel or am I doing something wrong? As I said, it
works for the copy/paste.
Thanks!
Joe