Dragging Cell Contents

xl_psychic

Active Member
Joined
Jan 4, 2004
Messages
359
Hi,

Im back with my queries. This time around its a bit different. Or it might be one of the common ones on the board. In my workbook, I have prevented the user from Copying/Cuting data. However there are cells which are meant for input purpose and hence not locked. I am facing a #REF problem whenever the user drags the contents of such cells.

Is there any way to prevent the user from doing the same.

(OS: WinXP, Excel 2000)
 
Thanks Andrew... The code works just perfect... I have also reversed the same in the Worsheet_Deactivate procedure. One thing i wanted to ask was if the user is on the sheet in which the code resides and he saves the file will his Excel application be affected (as in other workbooks and Excel files that he will open after saving this one)

Please let me know and thanks once again for all the help.
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Have you tried it?

The Worksheet_Deactivate event procedure does not fire if you close a workbook, so you need to reset the property in the Workbook_BeforeClose event procedure.

By the way, what happens if the user's preference is to disable cell drag and drop? You should not set it to True unless that's what the user wants. You should store the user's setting somewhere (in a static variable or on a worksheet) and set it back to what it was.
 
Upvote 0
i dont want the user to save his/her preference. The reason for me entering this code is to save myself from the hassles of dealing with the #REF!. I'll insert the code in the workbook_beforeclose event procedure and try....

Thanks for the help...
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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