Is there a code to clear clipboard to prevent pasting on mouse
Thanks, Bernie.
Your code worked perfectly to clear the clipboard when a change was made on
the worksheet. However, it does not stop someone from cutting/pasting from
one cell to the next since they typically don't change the worksheet between
steps. Is there a way to have Excel execute a code (popup msg, etc.) anytime
someone puts something on the clipboard? This would take care of the problem
without restricting them all pasting. Thanks again, Carl
"Bernie Deitrick" wrote:
Carl,
Copy the code below, right-click the sheet tab and select "View Code" and paste the code into the
window that appears.
HTH,
Bernie
MS Excel MVP
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myType As Long
On Error GoTo noValidation
myType = Target.Cells(1).Validation.Type
Application.CutCopyMode = False
noValidation:
End Sub
"Carl" wrote in message
...
I have a problem in that users sometimes cut and past data from one cell to
the next in my worksheets and this wrecks the conditional formatting and
formulas. I can't protect the cells because they need to be able to make
entries and I can't allow specific users only because the users are always
changing. Is there a way to enter a worksheet macro that will clear the
clipboard before the paste command is run, thus preventing the activitiy?
Thanks in advance, Carl
|