Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / March 2004

Tip: Looking for answers? Try searching our database.

customize context menu

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy - 25 Mar 2004 02:11 GMT
I know how easy it is to customize toolbars and menu bars but that seems
to exclude the "right click" context menu. How can I do that?
I want to add a summation command and a data sort command, I use them a lot.
Gord Dibben - 25 Mar 2004 02:44 GMT
Andy

Done through VBA code.  In the ThisWorkbook module.

Private Sub WorkBook_Open()
With Application.CommandBars("Cell").Controls.Add(temporary:=True)
   .Caption = "Change Text Case"
   .OnAction = "MyMacros.xla" & "!Chg_Case"
   End With
End Sub

To clear the menu when you close.  Otherwise you get duplicates.

Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Cell").Controls("Change Text Case").Delete
End Sub

Place this code in your Personal.xls or in my case, the MyMacros add-in.

Gord Dibben Excel MVP

>I know how easy it is to customize toolbars and menu bars but that seems
>to exclude the "right click" context menu. How can I do that?
>I want to add a summation command and a data sort command, I use them a lot.
David McRitchie - 25 Mar 2004 18:17 GMT
Hi Andy,
You specifically asked for AutoSum -- don't know what the fascination is
about AutoSum on right click menus is but see this previous posting:
  http://google.com/groups?threadm=ujkvPg0DEHA.3064%40tk2msftngp13.phx.gbl

I won't touch the sort part of your question, as I can't think of anything that
would be generic work in a wide range of situations and not mess up
data if used accidentally.  At least not without particulars on exactly
what you want and why a right-click menu.   Some help on using sort
  http://www.mvps.org/dmcritchie/excel/sorting.htm#ctrla
---
HTH,
David McRitchie, Microsoft MVP - Excel    [site changed  Nov. 2001]
My Excel Pages:  http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:        http://www.mvps.org/dmcritchie/excel/search.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.