LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Prevent copy and paste in one column

I am having trouble trying to prevent copying and pasting in one specific
column. The code refers to the specific range, but yet it prevents copying
and pasting on the whole worksheet.

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(Target, Columns("H:H")) Is Nothing Then
Application.CellDragAndDrop = False
Application.CutCopyMode = False
Else
Application.CellDragAndDrop = True
End If

End Sub
 
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
Can you prevent Copy-Paste from changing formatting without macros DCramlet Excel Discussion (Misc queries) 6 May 30th 14 07:18 AM
Prevent Copy/Paste Q Seanie Excel Programming 9 October 22nd 08 09:56 PM
Unable to prevent copy/paste of protected worksheet into new docum Richard R. Excel Programming 11 May 2nd 07 04:27 AM
How to prevent copy/paste of cell with validation? Joe HM Excel Programming 0 May 11th 06 10:14 PM
prevent the copy and paste function sir Lancelot Excel Discussion (Misc queries) 1 December 8th 05 01:16 AM


All times are GMT +1. The time now is 01:48 PM.

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"