Disable Drag & Drop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can you programically disable the drag & drop EDIT from the application
so it is no longer an option under TOOLS>>OPTIONS while the workbook is open?

Excel 2003
 
Thanks Sandy, but this is only a temporary fix as the user can reactivate it
through the menu.

I want to remove/disable the option while my workbook is open.
 
Put this code in the ThisWorkbook level of Visual Basic Editor. This
will disable the options drop down and then disable drag and drop when
the workbook is active. Then when the workbook in deactive (in the
backround) the both of the above will be enabled. This will let you
drag and drop/use option drop down on other workbooks that are open

Private Sub Workbook_Activate()
Application.CommandBars("Tools").Controls("Options...").Enabled = False
Application.CellDragAndDrop = False
End Sub

Private Sub Workbook_Deactivate()
Application.CommandBars("Tools").Controls("Options...").Enabled = True
Application.CellDragAndDrop = True
End Sub


Sandy
 
Back
Top