Drag and drop cells-turn it off?

Ranger_j

New Member
Joined
Jul 1, 2008
Messages
21
I'm having trouble with a spreadsheet, in that users have a nasty habit of putting data into the wrong cells, then dragging them where the data is supposed to go, which, of course, drags the formulas, messes up calcuations elsewhere on the sheet, and creates mass chaos.

I know I can turn off drag and drop in the tools menu, but that seems to turn it off in my Excel executable, not tie the command to the particular spreadsheet. So problem not solved if someone opens the sheet on another computer.

Is there a way to turn off drag and drop in a workbook (or even an individual sheet) and have that setting follow the file wherever it may go?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi

How about protecting the cells which you don't want to allow the user to change

KR


Dave
 
Upvote 0
Try this. Right click the Excel logo just to the left of File on the memu bar, select View Code and paste in

Code:
Private Sub Workbook_Open()
Application.CellDragAndDrop = False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CellDragAndDrop = True
End Sub
 
Upvote 0
You could try VoG II's code in an activate/deactivate event also this way you could have the drag and drop active for other workbooks
 
Upvote 0
Dave is correct. You could remove the code from the ThisWorkbook module then right click the sheet tab, View Code and paste in

Code:
Private Sub Worksheet_Activate()
Application.CellDragAndDrop = False
End Sub

Private Sub Worksheet_Deactivate()
Application.CellDragAndDrop = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top