I would like requesting helps. Please tell me how to prevent copying cell data on excel using VBA code Thanks
I would like requesting helps. Please tell me how to prevent copying cell data on excel using VBA code Thanks
do this
& note before running this macro click on blank cell first
[VBA]Sub prevent_copy()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlNoSelection
End Sub
[/VBA]
I have tried that script, yes we can't select the cell but if I right click the cell then select copy and paste on another excel sheet, the content of the cell was pasted
I'm trying to use this script
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Rows.Count > 1 or Target.Columns.Count>1 Then _
Cells(Target.Row, Target.Column).Select Application.CutCopyMode_
= False
End Sub
But Not work, Please your suggestion. Thanks
You could remap the Copy buttons on File and right-click and re-assign Ctrl-C.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
for that only i told u to select blank cell before executing this macro then it will copy the data but there will be no records to paste & because of protection he can not further select the data in protect sheet
his selection will be limited to first selected cell only before executing the macro