Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Trapping Keystrokes from Addin

Hi,
I have developed an Excel Addin using VB .NET and am trying to work out
how to capture keypress events.

I suspect it would follow the same principles as a COM

I see the Application.OnKey method, but this only seems to call an
excel macro. Is there any way for it to trigger an VB event.
Any ideas would be most appreciated.

Regards,
Peter

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Trapping Keystrokes from Addin

Hi Peter,

I have developed an Excel Addin using VB .NET and am trying to work out
how to capture keypress events.

I suspect it would follow the same principles as a COM

I see the Application.OnKey method, but this only seems to call an
excel macro. Is there any way for it to trigger an VB event.
Any ideas would be most appreciated.


Unfortunately, the Excel Application doesn't expose keyboard events for
external automation clients to bind to (be that COM Addins, VB6 or
VB.NET). The OnKey can only be used to call a VBA routine. This is one of
the reasons why I recommend incorporating VB.NET into Excel-based
applications by exposing them as COM Classes, loaded and controlled by a
VBA wrapper addin.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


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
Switch between sheets with keystrokes? rich575 Excel Worksheet Functions 3 November 14th 07 03:21 AM
Replacing keystrokes Terry Lowe Excel Programming 2 August 22nd 04 09:34 PM
Select in Listbox using keystrokes [email protected] Excel Programming 2 May 6th 04 07:36 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM
Toggle Macro with KeyStrokes Cesar Zapata[_2_] Excel Programming 0 November 13th 03 05:07 PM


All times are GMT +1. The time now is 10:47 AM.

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"