I can't copy data from one workbook to another due to Application.CellDragAndDrop = False

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
305
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have a workbook where I want to limit the user's ability to accidentally change the formatting on certain unprotected cells. (The cell can't be protected because I need to allow the user to input data into them, I just don't want things to get changed like number formatting, background color, etc.)

One of the things I'm doing to make sure they don't accidentally change the formatting is I have this line of the code in the Workbook_Activate sub:

Code:
Application.CellDragAndDrop = False

The problem I'm having is, this line of code seems to remove any data from the clipboard. So if the user is trying to copy data from a different workbook, it won't work. Whenever I hit paste, nothing happens except for the "ding" sound that Excel makes.

Is there any way to set CellDragAndDrop to False without having it remove whatever is in the clipboard? If not, any suggestions for how I can disable CellDragAndDrop in my workbook but still allow the user to copy & paste from a different workbook?
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I have a workbook where I want to limit the user's ability to accidentally change the formatting on certain unprotected cells. (The cell can't be protected because I need to allow the user to input data into them

There are quite a few add-ons that have the ability to lock cell formatting.
I know Kutools has one in the Worksheet Design tab
may want to research some add-ons for simple design elements such as that :)
 
Last edited:
Upvote 0
Thanks, Blake. I will look into Kutools. In regards to CellDragAndDrop, I'm guessing there is no way to stop it from deleting whatever is in the clipboard when you set it to False?
 
Upvote 0
Thanks, Blake. I will look into Kutools. In regards to CellDragAndDrop, I'm guessing there is no way to stop it from deleting whatever is in the clipboard when you set it to False?

not that i am aware of, but perhaps someone else could shed some light on this?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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