LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to map a shortcut key to a routine in COM AddIn for Excel 2007

1. Background:

I have a COM addins developed in Visual basic 6.0 for EXCEL 2007. The COM
addin has its toolbar visible. It exposes customized 'Copy' as a button on
the toolbar, which will call MyCopyAction routine in the COM addin.

2. What I want:

I want to map a shortcut key for the customized 'copy' operation, which
indeed invoke the same routine as that on toolbar, i.e. MyCopyAction.

3. What I tried in the COM addin:

I added the following line in

Private Sub AddinInstance_OnStartupComplete(custom() As Variant)

....

Application.OnKey "+^c", "MyCopyAction"
....

End Sub

Problem was: Message box from EXCEL "cannot run the macro MyCopyAction ...".
MyCopyAction is not a macro. It's a routine in the COM AddIn. What options
do I have to make it work?

Thanks!

 
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
delete addin in Excel 2007 Ken Excel Programming 2 April 2nd 10 11:11 AM
Excel 2003 AddIn in 2007 Phil Hibbs Excel Programming 1 November 3rd 09 01:51 PM
patternfill addin Excel 2007 Roland Charts and Charting in Excel 4 September 26th 09 11:13 AM
patternfill addin Excel 2007 Roland Excel Discussion (Misc queries) 1 September 15th 09 04:14 PM
Excel 2007 VBA Addin MR From Texas[_2_] Excel Programming 5 September 3rd 09 03:15 PM


All times are GMT +1. The time now is 09:24 PM.

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

About Us

"It's about Microsoft Excel"