ADD A COMMAND TO MOUSE RIGHT CLICK

F

frankoklahoma

How can I add a command to the "right click" on my mouse in Excel? I want to
have the "SUM" command on my mouse. Can I do this?
 
C

Chip Pearson

You can modify the right-click menu only with VBA. If you want to add
the existing AutoSum button to the right-click menu, run the following
code:

Sub AddSumToCellMenu()
On Error Resume Next
Application.CommandBars.FindControl(Tag:="MySum").Delete
On Error GoTo 0
Application.CommandBars("Cell").Controls.Add(ID:=226).Tag =
"MySum"
End Sub


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top