Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I make a button to PasteSpecial Values only.
I am trying to create a command button that will copy a
cells values only. Expamle: Copy,PasteSpecial,Values: B10 to B5. B10 has a =Sum in it and all I want to copy is the amount in B10 to B5 and I need a button to do this. Can anyone Help me. Thanks Rick |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I make a button to PasteSpecial Values only.
tools=customize
go to the middle tab, Select edit in the left window in the right window you will find a PasteSpecial button, drag it to a toolbar. -- Regards, Tom Ogilvy Rick wrote in message ... I am trying to create a command button that will copy a cells values only. Expamle: Copy,PasteSpecial,Values: B10 to B5. B10 has a =Sum in it and all I want to copy is the amount in B10 to B5 and I need a button to do this. Can anyone Help me. Thanks Rick |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I make a button to PasteSpecial Values only.
Try putting this in Personal.xls:
Sub ValuesOnly() Application.ScreenUpdating = False On Error Resume Next If Application.CutCopyMode = False Then With Selection .Copy .PasteSpecial xlValues End With With Application .ScreenUpdating = True End With Else Selection.PasteSpecial xlValues End If Application.CutCopyMode = False End Sub Sub AddControl() With CommandBars("Cell").Controls.Add(msoControlButton) .Caption = "Values" .FaceId = 1183 .OnAction = "ValuesOnly" End With End Sub Run the second procedure and save personal.xls You should now have a star on the menu when you right-click a cell if you copy B5 and then right-click B10 and press the star then just the values of B5 will be copied. To re-set the 'cell' menu run this in the immidiate window: CommandBars("Cell").Reset be warned - if you've already modified this menu then the modifications will be lost, in which case run: CommandBars("Cell").Controls("Values").Delete Regards, Jason "Tom Ogilvy" wrote in message ... tools=customize go to the middle tab, Select edit in the left window in the right window you will find a PasteSpecial button, drag it to a toolbar. -- Regards, Tom Ogilvy Rick wrote in message ... I am trying to create a command button that will copy a cells values only. Expamle: Copy,PasteSpecial,Values: B10 to B5. B10 has a =Sum in it and all I want to copy is the amount in B10 to B5 and I need a button to do this. Can anyone Help me. Thanks Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
key shortcut for PasteSpecial-Values | Excel Discussion (Misc queries) | |||
make a cell into a button | Excel Discussion (Misc queries) | |||
Make a 'Print button' | New Users to Excel | |||
Quickest alternative for shortcut of PasteSpecial then Values | Excel Worksheet Functions | |||
Command Button for PasteSpecial - Values - Transpose | Excel Discussion (Misc queries) |