B
BoredwithExcel
Hi there,
i want to prevent users from pasting more than one column at a time in
a sheet.
So I put in the following code.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If InStr(1, Target.Address, ":", vbBinaryCompare) Then
If Sheet1.Range(Target.Address).Columns.Count > 1 Then
MsgBox "please copy paste one column at at time. our
developers are getting tired of this crap"
Exit Sub
End If
End If
End Sub
However the trouble with this is that it doesn't allow me to select
multiple columns from the sheet.
How do I distinguish between pasting and selecting?
Thanks in Advance
i want to prevent users from pasting more than one column at a time in
a sheet.
So I put in the following code.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If InStr(1, Target.Address, ":", vbBinaryCompare) Then
If Sheet1.Range(Target.Address).Columns.Count > 1 Then
MsgBox "please copy paste one column at at time. our
developers are getting tired of this crap"
Exit Sub
End If
End If
End Sub
However the trouble with this is that it doesn't allow me to select
multiple columns from the sheet.
How do I distinguish between pasting and selecting?
Thanks in Advance