+ Reply to Thread
Results 1 to 5 of 5

Assign ShortCut-key To Toggle VBA-toolbar?

  1. #1
    SIGE
    Guest

    Assign ShortCut-key To Toggle VBA-toolbar?

    Hi There,

    Is it possible to toggle a Toolbar via a shortcut combination?

    Like:
    Ctrl + Shift + 0 pops up the VBA-toolbar (or a custom ...)

    Sige

  2. #2
    Tom Ogilvy
    Guest

    Re: Assign ShortCut-key To Toggle VBA-toolbar?

    Look at Application.Onkey

    just assign a macro to the key combination that does what you want.

    --
    Regards,
    Tom Ogilvy


    "SIGE" <[email protected]> wrote in message
    news:[email protected]...
    > Hi There,
    >
    > Is it possible to toggle a Toolbar via a shortcut combination?
    >
    > Like:
    > Ctrl + Shift + 0 pops up the VBA-toolbar (or a custom ...)
    >
    > Sige




  3. #3
    SIGE
    Guest

    Re: Assign ShortCut-key To Toggle VBA-toolbar?

    Hi Tom,

    I thought there was a way to do it directly but ... I got out of the
    woods with this:

    Sub LaunchVBAToolbar()
    Application.CommandBars("Visual Basic").Visible = True
    End Sub

    Sub ShortCutToVBAToolBar()
    Application.OnKey "^+{v}", "LaunchVBAToolbar" 'ctrl + shift + v
    End Sub

    Sub ResetShortCutVBAToolbar()
    ' To revert to default keypress result
    Application.OnKey "+^{v}", ""
    End Sub

    Thanks, Sige


    "NOSPAM" to be removed for direct mailing...

    *** Sent via Developersdex http://www.developersdex.com ***

  4. #4
    Chip Pearson
    Guest

    Re: Assign ShortCut-key To Toggle VBA-toolbar?

    > ' To revert to default keypress result
    > Application.OnKey "+^{v}", ""


    This does not revert to the default keypress result. Instead, it
    makes the keypress action do nothing at all. To revert to the
    default, omit the second argument to OnKey.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "SIGE" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi Tom,
    >
    > I thought there was a way to do it directly but ... I got out
    > of the
    > woods with this:
    >
    > Sub LaunchVBAToolbar()
    > Application.CommandBars("Visual Basic").Visible = True
    > End Sub
    >
    > Sub ShortCutToVBAToolBar()
    > Application.OnKey "^+{v}", "LaunchVBAToolbar" 'ctrl + shift
    > + v
    > End Sub
    >
    > Sub ResetShortCutVBAToolbar()
    > ' To revert to default keypress result
    > Application.OnKey "+^{v}", ""
    > End Sub
    >
    > Thanks, Sige
    >
    >
    > "NOSPAM" to be removed for direct mailing...
    >
    > *** Sent via Developersdex http://www.developersdex.com ***




  5. #5
    SIGE
    Guest

    Re: Assign ShortCut-key To Toggle VBA-toolbar?

    Ooops...

    Though Standard-wise Excel has nothing set on the shortcut: Ctrl+Shift+v

    So "normally..." it would not make much difference!
    -I think...-

    Check:
    http://www.cpearson.com/excel/KeyboardShortcuts.htm

    Thanks a lot Chip!
    Sige

    "NOSPAM" to be removed for direct mailing...

    *** Sent via Developersdex http://www.developersdex.com ***

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1