Right Mouse Click

S

StephenD

Can I modify the right mouse click options?

Preferably I would like to do this without VBA, however . . if that is the
only way then how would I add Paste Special Formulas as a single option
(mouse click) without having to navigate into Paste Special options window?

I would like this option to be available to all of my workbooks.


Thanks in advance for any help you can provide,


Stephen
 
D

Dave Peterson

How about an alternative?

Mmaybe you can just add an icon to your favorite toolbar (xl2003 and below)
or to the QAT in xl2007:

Tools|customize|Commands tab
Scroll down on the right hand side and drag "paste values" to your favorite
toolbar.
 
G

Gary''s Student

If you change you mind about VBA, consider the following three macros:

Sub FormulaPaster()
ActiveCell.PasteSpecial Paste:=xlPasteFormulas
End Sub


Sub AddShortcutMenuItems()
Dim new_menu_item As CommandBarButton
Call DeleteShortcutMenuItems
With Application.CommandBars("Cell")
Set new_menu_item = .Controls.Add(Type:=msoControlButton, before:=1)
With new_menu_item
.Caption = "&Paste Formula"
.OnAction = "FormulaPaster"
.Style = msoButtonIconAndCaption
.FaceId = 8
End With
End With
End Sub



Sub DeleteShortcutMenuItems()
On Error Resume Next
With Application.CommandBars("Cell")
.Controls("&Paste Formula").Delete
End With
End Sub


Running AddShortcutMenuItems will add the option to the right-click menu.

DeleteShortcutMenuItems will remove the option.

FormulaPaster does the pasting
 
S

StephenD

All - sorry I did not get back sooner (I was away) but I wanted to thank you
for your all of your help. It looks as if I will be taking the VBA approach.
 
S

StephenD

Thanks Dave. I did consider that but I really like the convenience of mouse
button actions as they don't require me to move from the active cell I am
working with.
 

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