Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
key shortcut for PasteSpecial-Values Jarek Kujawa[_2_] Excel Discussion (Misc queries) 1 July 16th 08 01:34 PM
make a cell into a button RGlade Excel Discussion (Misc queries) 1 January 28th 08 07:35 PM
Make a 'Print button' BrianT New Users to Excel 2 June 30th 06 09:57 PM
Quickest alternative for shortcut of PasteSpecial then Values rony4icab Excel Worksheet Functions 2 May 18th 06 08:56 AM
Command Button for PasteSpecial - Values - Transpose Alisha Excel Discussion (Misc queries) 0 March 10th 06 09:39 PM


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"