Thread: Shortcut key
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Shortcut key

And if you want it in the cell contex menu run this one time

This example will add the Paste Special values button to the Cell menu after the Paste option.


Sub Add_Paste_Special_Button()
' This will add the Paste Special values button to the cell menu
' after the Paste option
Dim Num As Long
Num = Application.CommandBars("Cell"). _
FindControl(ID:=755).Index
Application.CommandBars("cell").Controls. _
Add Type:=msoControlButton, ID:=370, befo=Num
End Sub


Sub Delete_Paste_Special_Button()
On Error Resume Next
Application.CommandBars("cell").FindControl(ID:=37 0).Delete
On Error GoTo 0
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl


"David McRitchie" wrote in message ...
Example of a macro to use
http://www.mvps.org/dmcritchie/excel/paste.htm#values

The actual code is one line, the rest is for error checking

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False


---
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

"Ron de Bruin" wrote in message ...
Hi Steph

You can make your own macro and assign a shortcut key or add the button
to your toolbar manual or with code.

Viewtoolbars...Customize on the edit list a icon with 12 in it
Drag it to your toolbar

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steph" wrote in message ...
Is there a way to assign a shortcut key stroke (like Ctl Z) to Paste Special/Values?