MrExcel Publishing
Your One Stop for Excel Tips & Solutions

"Paste Special" > "Values" Toolbar Button

Posted by James on July 13, 2001 6:44 AM

Is there a way/how would I create a toolbar button in Excel that would automatically when depressed "PASTE-SPECIAL" > "VALUES" without me having to enter any menus? - (Using Excel 97)
Thanks for any assistance

Posted by Alix on July 13, 2001 6:55 AM

Not a button but...

Easiest thing to do is to copy the range you want, select the area/cell to paste into.
Hold down the alt button and press ESV
then press return

Posted by Joe Was on July 13, 2001 10:12 AM

Sub sPaste()
'This code pastes the format and value of the current selection,
'to the active range. The Macro option has been set to Hot-key Ctrl-s but can be assigned to the toolbar.

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

End Sub

To asign to a custom toolbar button:
Menu; Tools-Customize Commands-Macros-Categories
Commands-Custom Drag button to toolbar
Right-Click the toolbar button, Assign macro
Macro name "Name"

Hope this helps. JSW

Posted by Joe Was on July 13, 2001 10:16 AM

This code special pastes the selected values to the selected range.