#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Paste Special

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Paste Special

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Paste Special

Gord This is not exactly what I need.
I will already have copied a range to the clipboard.
I now want to select another range and copy the clopboard to the newly
selected range. Thanks

"Gord Dibben" wrote:

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Paste Special

Remove the Selection.Copy line.

Not sure why I added it to start with.

Sub Paste_Values()
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord

On Sat, 1 Mar 2008 09:53:01 -0800, John Tripp
wrote:

Gord This is not exactly what I need.
I will already have copied a range to the clipboard.
I now want to select another range and copy the clopboard to the newly
selected range. Thanks

"Gord Dibben" wrote:

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Paste Special

Gord, thanks. Even though it is simple, you saved me time in trial and
error. This is a big help. I actually modified it to do values, formats and
column width all at once. This is the most common thing i do when I do these
copies. Now i only wish I could add it to the popup menu that comes up when
I right click on a cell. Is that possible

"Gord Dibben" wrote:

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Paste Special

Gord, thanks. Even though it is simple, you saved me time in trial and
error. This is a big help. I actually modified it to do values, formats and
column width all at once. This is the most common thing i do when I do these
copies. Now i only wish I could add it to the popup menu that comes up when
I right click on a cell. Is that possible


"Gord Dibben" wrote:

Remove the Selection.Copy line.

Not sure why I added it to start with.

Sub Paste_Values()
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord

On Sat, 1 Mar 2008 09:53:01 -0800, John Tripp
wrote:

Gord This is not exactly what I need.
I will already have copied a range to the clipboard.
I now want to select another range and copy the clopboard to the newly
selected range. Thanks

"Gord Dibben" wrote:

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Paste Special

Copy to Thisworkbook Module.

Private Sub Workbook_Open()
Application.CommandBars("Cell").Controls("Paste Values").Delete
With Application.CommandBars("Cell").Controls.Add(tempo rary:=True)
.BeginGroup = True
.Caption = "Paste Values"
.OnAction = "MyMacros.xla" & "!Paste_Values"
End With
End Sub

Always a good idea to delete first then re-create so's you don't get more than
one copy of the item on the right-click menu.

If you want it for just one workbook, put the code above in that workbook then
add a BeforeClose event to delete it.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Cell").Controls("Paste Values").Delete
End Sub

I have all my macros and functions in an add-in named MyMacros.xla.

You will adjust to the workbook that contains your macros.

Maybe Personal.xls?


Gord

On Sat, 1 Mar 2008 14:52:02 -0800, John Tripp
wrote:

Gord, thanks. Even though it is simple, you saved me time in trial and
error. This is a big help. I actually modified it to do values, formats and
column width all at once. This is the most common thing i do when I do these
copies. Now i only wish I could add it to the popup menu that comes up when
I right click on a cell. Is that possible

"Gord Dibben" wrote:

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Paste Special

Thanks again. You have given me some good tips and I can see how to use them
in other situations.

"Gord Dibben" wrote:

Copy to Thisworkbook Module.

Private Sub Workbook_Open()
Application.CommandBars("Cell").Controls("Paste Values").Delete
With Application.CommandBars("Cell").Controls.Add(tempo rary:=True)
.BeginGroup = True
.Caption = "Paste Values"
.OnAction = "MyMacros.xla" & "!Paste_Values"
End With
End Sub

Always a good idea to delete first then re-create so's you don't get more than
one copy of the item on the right-click menu.

If you want it for just one workbook, put the code above in that workbook then
add a BeforeClose event to delete it.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Cell").Controls("Paste Values").Delete
End Sub

I have all my macros and functions in an add-in named MyMacros.xla.

You will adjust to the workbook that contains your macros.

Maybe Personal.xls?


Gord

On Sat, 1 Mar 2008 14:52:02 -0800, John Tripp
wrote:

Gord, thanks. Even though it is simple, you saved me time in trial and
error. This is a big help. I actually modified it to do values, formats and
column width all at once. This is the most common thing i do when I do these
copies. Now i only wish I could add it to the popup menu that comes up when
I right click on a cell. Is that possible

"Gord Dibben" wrote:

ToolsCustomizeCommandsMacros.

Drag the Custom Menu Item to the Edit Menu.

Assign this macro to the Custom Item

Sub Paste_Values()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 05:54:00 -0800, John Tripp
wrote:

How can I create a menu item under Edit to execute the equivalent of the menu
commands Edit-Paste Special-Values? Thanks




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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
'paste special', 'paste link' formatting transfer jrebello Excel Discussion (Misc queries) 2 July 25th 07 08:46 AM
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Paste and Paste Special command are not enabled in Excel mcalder219 Excel Worksheet Functions 0 April 26th 06 06:57 PM


All times are GMT +1. The time now is 01:39 PM.

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

About Us

"It's about Microsoft Excel"