PDA

View Full Version : Sleeper: Disable CellDragAndDrop for FillRight AND FillLeft



Emily
07-16-2005, 07:35 PM
Is there any method to disable CellDragAndDrop during FillLeft and FillRight, i.e only allow FillDown?

Thanks
Emily

Jacob Hilderbrand
07-16-2005, 07:49 PM
Application.CellDragAndDrop = False


This will disbable all Drag and Drop functionality, however, the user could just change the setting to re-enable Drag and Drop in their options.

You can disable the options like this:



Application.CommandBars("Worksheet Menu Bar").Controls("&Tools").Controls("&Options...").Enabled = False


But then the user could reset the Command Bar, so we have to shut that down as well.



Application.CommandBars.DisableCustomize = True

Emily
07-16-2005, 08:07 PM
Thanks DRJ

But how can I place FillLeft, FillRight in the "Option"?

Justinlabenne
07-16-2005, 11:20 PM
Off-hand: No.

After researching a bit: No

You can disable the cell drag and drop entirely using the first fo DRJ's code lines that he posted, but I really have never heard of, nor can think of a way to do this. Maybe a macro is in order that will perform the Fill-Down for you, and then disable drag and drop so the user cannot drag and drop in any direction. but the code would replicate what you are trying to achieve.

For anyone working on a solution this is Cross-Posted at MrExcel.com (http://www.mrexcel.com/board2/viewtopic.php?t=157613)

Ivan F Moala
07-16-2005, 11:56 PM
Here is a thought ...
You could detect the left button down AND Statusbar text to detect a Fill via a Timer / hook procedure.
Have I tried this (not this particular scenario but similar) ... NO .... doable Yes .... sorry no time to try this out.
You would need Xl2000+ to do what I think can be done via the Addressof operator.

Justinlabenne
07-17-2005, 12:01 AM
Leave it to Ivan to have an idea on how to do the seemingly impossible. :doh:Any time I have a doubt I will email you first to check for the possiblity. :devil:


(kidding, that would be alot of mail)