PDA

View Full Version : Solved: VBA Block Drag and Drop



brorick
09-06-2006, 11:01 AM
Does anyone know how to prevent a user from using the drag and drop feature using VBA? I know the user can turn this feature on and off using Tools | Options | Edit feature, but I am protecting a worksheet and I would really like to prevent someone from accidently dragging and dropping cells. : pray2:

Thank you for your help in advance.

Marcster
09-06-2006, 11:17 AM
Application.CellDragAndDrop = False

Marcster.

brorick
09-06-2006, 11:22 AM
It worked! Thank you Marcster.

Marcster
09-06-2006, 11:26 AM
Glad to help :yes.

Marcster.

Cyberdude
09-06-2006, 06:59 PM
I hate to admit it, but in the context of brorick's question, I'm not too sure exactly what the "cell drag and drop" process is. What does one do to drag and drop a cell? What is the result?

brorick
09-07-2006, 05:33 AM
It is when a user places there pointer at the bottom of a cell, left clicks and keeps it pressed down while they drag that cell and its contents to another location on the spreadsheet. It is equivalent to highlighting text in Word, left clicking and keeping it pressed down while they drag that highlighted text to another part of the document.

This is a nightmare when your formulas reference a specific cell that contains vital data. If the user transfers that data to another cell by accident then your formula will no longer be valid and your data has become compromised.

Cyberdude
09-07-2006, 10:36 AM
Thanks, brorick. I do that all the time. I just never knew what you call it.