How to prevent copy and paste in Excel
huyari
Posted messages
20
Status
Member
-
skk201 Posted messages 942 Registration date Status Member Last intervention -
skk201 Posted messages 942 Registration date Status Member Last intervention -
Hello,
I would like to prevent copying and pasting in some Excel columns while allowing the user to write in those columns!!
Is this possible?
Do you have any ideas?
Unfortunately, I don't have much knowledge of VBA...
Thank you!!
Configuration: Windows 7 / Firefox 13.0.1
I would like to prevent copying and pasting in some Excel columns while allowing the user to write in those columns!!
Is this possible?
Do you have any ideas?
Unfortunately, I don't have much knowledge of VBA...
Thank you!!
Configuration: Windows 7 / Firefox 13.0.1
1 answer
Hello,
on this site you will find the code to disable Ctrl+C and Ctrl+V (copy/paste via keyboard shortcuts)
http://www.vbaexpress.com/kb/getarticle.php?kb_id=373
And add this code in the VBA of your sheet to disable mouse copy/paste
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("A2:A32")) Is Nothing Then
Cancel = True
End If
End Sub
See you!
on this site you will find the code to disable Ctrl+C and Ctrl+V (copy/paste via keyboard shortcuts)
http://www.vbaexpress.com/kb/getarticle.php?kb_id=373
And add this code in the VBA of your sheet to disable mouse copy/paste
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("A2:A32")) Is Nothing Then
Cancel = True
End If
End Sub
See you!
Do you know if these macros also block copy/paste via macro?
Because I would like to prevent people from pasting information into the workbook, but allow a macro that serves as a sort of backup, which uses copy/paste functions.