Trap CTRL+C keypress event

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Is there a way to trap the CTRL+C (Window's copy event) in
Excel 2000. I want to know when a user press the CTRL+C,
what is the cell(s) address or range.
 
You use OnKey to attach a macro to a key press (supplanting the default
behavior).

So..

Sub TrapCtrlC()
Application.OnKey "^c", "MyCopyMacro"
End Sub

Sub MyCopyMacro()
'Your code here
End Sub
 
I tried placing the code, and press CTRL+C, the event did not fire. Do I
need to do anything else besides placing the code?
 
hasan said:
I tried placing the code, and press CTRL+C, the event did not fire. Do I
need to do anything else besides placing the code?

You need to execute it once.

Regards,
 
Back
Top