Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how to get a simple macro to paste value
i want a shortcut to paste values. the normal method is copy something and click paste options paste values.but is there a way to do it fast? can we use a simple macro?on one 'basic'named sheet i would select a range on the next sheet named 'values' it should copy the values only. why this macro gives error message?
Runtime error'1004' Pastespecial method of range class failed. Sub PasteVal() Selection.PasteSpecial Paste:=xlValues End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get a simple macro to paste value
Hi,
Am Mon, 24 Mar 2014 16:54:35 +0000 schrieb sumesh56: why this macro gives error message? Runtime error'1004' Pastespecial method of range class failed. Sub PasteVal() Selection.PasteSpecial Paste:=xlValues End Sub before you can paste you have to copy. Try: Sub PasteVal() Selection.Copy Sheets("values").Range("A1").PasteSpecial xlPasteValues End Sub Regards Claus B. -- Vista Ultimate SP2 / Windows7 SP1 Office 2007 Ultimate SP3 / 2010 Prodessional |
#3
|
|||
|
|||
Quote:
I made a selection of a range in one sheet and went to another sheet click on R3 cell to where i wanted the display .before doing that i have edited the macro 'A1' to R3. the message is Runtime error '9' Subscript out of range. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to get a simple macro to paste value
Hi,
Am Tue, 25 Mar 2014 01:21:58 +0000 schrieb sumesh56: I made a selection of a range in one sheet and went to another sheet click on R3 cell to where i wanted the display .before doing that i have edited the macro 'A1' to R3. the message is Runtime error '9' Subscript out of range. make your selection to copy and run the macro. Don't go to another sheet. Regards Claus B. -- Vista Ultimate SP2 / Windows7 SP1 Office 2007 Ultimate SP3 / 2010 Prodessional |
#5
|
|||
|
|||
Quote:
sheet.[quote] [color=blue]but that is what i wanted. i shall make a selection in one sheet and go to another sheet click on a cell and then run the macro. i should get the result displayed from the cell.[color=blue] |
#6
|
|||
|
|||
[quote=sumesh56;1616787][quote]make your selection to copy and run the macro. Don't go to another
sheet. Quote:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple Macro - I think... Copy - Paste on Click | Excel Discussion (Misc queries) | |||
Need simple macro to copy and paste values | Excel Programming | |||
Need simple 'Paste' macro code | Excel Programming | |||
How to write a simple copy-paste macro? | New Users to Excel | |||
Simple Cut & Paste Macro needed :) | Excel Programming |