Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
om...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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
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
keyboard shortcut to toggle $ on and off Jimbo Excel Discussion (Misc queries) 2 December 1st 07 08:59 PM
Keyboard shortcut to toggle between worksheets TypeType Excel Discussion (Misc queries) 1 April 11th 07 04:11 AM
Shortcut toggle between worksheets in the same workbook? Chris Excel Worksheet Functions 3 October 4th 06 08:59 PM
Shortcut to toggle active Worksheet m Shane Excel Programming 2 December 27th 03 09:15 PM
Toggle ShortCut Key sequence J.E. McGimpsey Excel Programming 0 September 9th 03 06:53 PM


All times are GMT +1. The time now is 03:25 AM.

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"