Friday, April 11, 2008

Disable Drag & Drop of Cells in Excel VBA

Enable or Disable dragging and dropping cells in Excel

Sub Disable_Cell_Drag_Drop()

Application.CellDragAndDrop = False

End Sub

Application.CellDragAndDrop = True enables drag & drop

3 comments:

  1. Anonymous8:05 AM

    Is there VBA code to prevent drag & drop of a worksheet into another workbook?

    ReplyDelete
  2. Anonymous3:23 AM

    Many thanks

    That works fine to prevent dragging/dropping cells within the spreadsheet. It doesn't seem to prevent a worksheet being dragged and copied by clicking on the worksheet tab, holding down ctrl and dragging the worksheet.

    ReplyDelete
  3. this disables the drag and drop in the whole document.
    how about in just one sheet, or only for a rage of cells in a sheet?

    ReplyDelete

StumbleUpon
Share on Facebook
Related Posts Plugin for WordPress, Blogger...
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.