LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Disable "Cut&Paste" and "Drag&Drop"

This was exatly what I needed. Thank you Tom! It works perfectly.

Tom Hutchins skrev:

I htink you are disabling cut/copy/drag temporarily, but it is getting
re-enabled by subsequent operations. Instead of the Workbook_Open event, use
the Workbook_SheetSelectionChange event. Every time any cell is selected,
cut/copy/drag is disabled. This event code needs to be in the ThisWorkbook
module:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Application.CutCopyMode = False
Application.CellDragAndDrop = False
End Sub

Hope this helps,

Hutch

"johnny" wrote:

I want to disable this two function when I open a workbook. I've tryed both
this code:
Private Sub Workbook_Open()
Application.CellDragAndDrop = False
Application.CutCopyMode = False
End Sub

and

Private Sub WorkbookOpen(ByVal Wb As Workbook)
Application.CellDragAndDrop = False
Application.CutCopyMode = False
End Sub
but no one of them will work the right way. I've put it both in a module, in
"This workbook" and in the actuall sheet.
Anybody got an idea whats wrong?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shortcut to switch from "fill down" to "copy" with mouse drag RJ Dake Excel Discussion (Misc queries) 3 August 13th 09 05:35 PM
how can I disable "cutting cells" and "drag and drop "in excel ? mwoody Excel Worksheet Functions 4 August 25th 08 03:53 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
disable cell "drag and drop" for a cell/range meeting given condit Valeria Excel Programming 2 January 3rd 05 12:35 PM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"