View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Valeria Valeria is offline
external usenet poster
 
Posts: 127
Default problem with Worksheet_SelectionChange

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