Disable Drag & Drop

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
 
G

Guest

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.
 
S

Sandy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top