Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Right click detection

It possible to trigger the macro right after the user chose (right
click) copy ? thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Right click detection

The right-click normally brings up the cell context menu, so it is possible
to do one of two things
- add another menu item to invoke your macro
-disable the menu and invoke your code.

This is an example of the latter on a particular worksheet

Option Explicit

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
MsgBox "hello"
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"broogle" wrote in message
oups.com...
It possible to trigger the macro right after the user chose (right
click) copy ? thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color detection Dan wilson Excel Worksheet Functions 3 March 31st 05 03:51 PM
Hidden Row Detection Nigel[_7_] Excel Programming 1 January 20th 05 03:13 PM
add-in detection romes1 Excel Programming 2 November 2nd 04 11:59 PM
on press detection Fraggs[_17_] Excel Programming 1 June 7th 04 03:26 PM
Detection of VBA code Chris Gorham[_3_] Excel Programming 2 November 1st 03 09:00 PM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"