Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Special
Hii All
The following code works fine: range("F12").Copy range("F13:F" & lrow - 1).PasteSpecial (xlPasteFormats) I tried to reduce it to the following and it gives an App error: range("F12").Copy range("F13:F" & lrow - 1).PasteSpecial(xlPasteFormats) It seems to be quite happy to accept the line of code when I type it in. Where is it wrong ?? Any advice is appreciated Regards Michael M |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Special
Thanks Martin
I read through my code books and basically there was no reference to what I was trying to do.....which usually means, very difficult to do. I appreciate your input but don't think for my small needs it will be necessary. I was simply trying to "clean up" my existing code. Regards Michael M "Martin Fishlock" wrote: You cannot reduce the paste special code. The copy command either copies the source to the clipboard or to a destination using the normal paste conditions. A solution is to write a subroutine to do a copy paste Sub mycopypaste(CopyFrom As Range, CopyTo As Range, PasteConditions) CopyFrom.Copy CopyTo.PasteSpecial PasteConditions End Sub -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "Michael M" wrote: Hii All The following code works fine: range("F12").Copy range("F13:F" & lrow - 1).PasteSpecial (xlPasteFormats) I tried to reduce it to the following and it gives an App error: range("F12").Copy range("F13:F" & lrow - 1).PasteSpecial(xlPasteFormats) It seems to be quite happy to accept the line of code when I type it in. Where is it wrong ?? Any advice is appreciated Regards Michael M |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Paste and Paste Special No Longer Working - Excel 2003 | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions | |||
How do I capture user paste action and convert to Paste Special | Excel Programming | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming |