View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default problem with Worksheet_SelectionChange

Certain actions cause the clipboard to be cleared when a range is selected
and you have done Edit=copy. This appears to be one of them.

--
Regards,
Tom Ogilvy

"Valeria" wrote in message
...
Dear experts,
I have the below code on the worksheet object of my workbook, to prevent
users to drag and drop cells in a certain range... it works, but it makes

the
"copy and paste" functionality of my worksheet disappear!
Is there a way I can have this back?
Thanks,
best regards,
Valeria

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myRange As Range
Set myRange = Range("ID_Conf")
If Application.Intersect(Target, myRange) Is Nothing Or Target.Text = "Y"

Then
Application.CellDragAndDrop = True
Else
Application.CellDragAndDrop = False
End If

End Sub