Consulting

Results 1 to 17 of 17

Thread: .OnAction = "Macro" Syntax for COM Addin

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular Mike_R's Avatar
    Joined
    May 2004
    Location
    Plainsboro, NJ
    Posts
    46
    Location

    .OnAction = "Macro" Syntax for COM Addin

    Ok, hey guys, since there's such a lopsided degree of Talent vs. Questioners here at this point, I thought I might throw this one out, and maybe someone here would have a clue.

    (I've also put this on Experts-Exchange, but not having much success...)

    Here's my Q:

    I wish to call a Macro within a COM Addin. Effectively I wish to let
    OnAction = "MyCOMAddin.MySub"
    From what I understand, my syntax should be something like
    .OnAction = "!<MYCOMADDIN.MYSUB>"
    But it does not seem to work.

    If this were for a CommandBarButton or CommandButton on a Worksheet, then I could use WithEvents and trap the _Click() Event. However, I seek to trap Application.OnKey() which requires a String name of the macro to be called.

    Any ideas on what the correct Syntax would be? (Or if this can be done at all.)

    Thanks,
    Mike
    Last edited by Mike_R; 05-26-2004 at 12:54 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •