Capture paste from Office Clipboard

V

VBA Noob

Hi,

A bit of background first

I have an event macro which I want to prevent from running if the user
paste some info from the office clipboard into a cell as it triggers
my events.

The below code works if the data is copied from one section of the
spreadsheet to another. Is there anyway to capture Ctrl + V using
select case?.

Select Case Application.CutCopyMode
Case Is = False
MsgBox "Not in Cut or Copy mode"
Case Is = xlCopy
MsgBox "In Copy mode"
Case Is = xlCut
MsgBox "In Cut mode"
End Select

FYI
I also looked at the on key event but didn't want to add a new module
to the workbook if I can avoid it
Application.OnKey "^v", "Macro1"

If I had to add a module I guess Chip site would be the best start??
http://www.cpearson.com/excel/vbe.aspx


Any suggestions of tips would be appreciated

Regards

VBA Noob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top