Disable Drag and Drop???

Parrow

New Member
Joined
Nov 30, 2014
Messages
33
How can I, or can I, disable Cell Drag and Drop via code or settings tied to the workbook?

I see there is an option I can un-check in the settings for Excel, (Enable Fill Handle and Drag and Drop) but the sheet I am making will be dropped onto 50+ computers, I would rather just lock up the workbook as much as possible, vs. having to manage settings on everyones comptuer.

Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the Board!

You can use something like this:

<font face=Calibri><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()<br>    Application.CellDragAndDrop = <SPAN style="color:#00007F">False</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>

You might also want to look into worksheet/book protection.

HTH,
 
Upvote 0
Awesome, thanks.

I use worksheet and workbook protection, but they can still drag and drop cells around the sheet. I will try that code and see if it does what I am wanting it to do. Thanks.
 
Upvote 0
Awesome! I love simple fixes. Just used the suggestion.

This has been the bane of my existence for months now. lol. Sheeple just won't do what is instructed and prefer to drag names around instead of deleting and typing...which in turn ruined the forumulas I had in the cell.

This little bit of coding just eliminated that from ever happening again.

Thanks a bunch.
 
Upvote 0
How do i get my drag/drop back in all the rest of my workbooks now? it appears to be disabled everywhere. THanks!
 
Upvote 0
If you used the code method above, just set it back to True. As for it happening in all of your workbooks, where did you put the code? If it's in Personal.xlsb, you probably want to get it out of there.
 
Upvote 0
If you used the code method above, just set it back to True. As for it happening in all of your workbooks, where did you put the code? If it's in Personal.xlsb, you probably want to get it out of there.

Well - I had tried it in a sheet and in a module. I think it was supposed to go into ThisWorkbook? BUT... I read on another post that there is a setting in Options/Advanced where you can manually restore the drag/drop.

Then I found another post and Jaafar answered with just the code I needed: a way to limit the Drag/Drop only on one page. The other pages are already write-protected etc. I just needed a way for the user to be able to enter data but not mess up my formulas. I'm super SUPER excited about this new functionality! :)

And thank YOU for your response, too! :)
cat
 
Upvote 0

Forum statistics

Threads
1,214,552
Messages
6,120,172
Members
448,948
Latest member
spamiki

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