ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Capture paste from Office Clipboard (https://www.excelbanter.com/excel-programming/410680-capture-paste-office-clipboard.html)

VBA Noob

Capture paste from Office Clipboard
 
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


VBA Noob

Capture paste from Office Clipboard
 
Anyone got any suggestions ??

Danny



All times are GMT +1. The time now is 03:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com