Prevent user to drag and drop

  • Thread starter Thread starter CVincent
  • Start date Start date
C

CVincent

I would like to prevent users to drag and drop data.
Please note that I cannot protect the cells because I
want the user to be able to change the data, but drag and
drop mess up all my references.
Any idea?
 
This is a setting in Tools>Options
You can change it with VBA

You can copy this two events in the ThisWorkbook module

Private Sub Workbook_Activate()
Application.CellDragAndDrop = False
End Sub

Private Sub Workbook_Deactivate()
Application.CellDragAndDrop = True
End Sub
 
Great. Thanks exactly what I needed.
-----Original Message-----
This is a setting in Tools>Options
You can change it with VBA

You can copy this two events in the ThisWorkbook module

Private Sub Workbook_Activate()
Application.CellDragAndDrop = False
End Sub

Private Sub Workbook_Deactivate()
Application.CellDragAndDrop = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top