View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default macro with paste special returns error

Runs for me. Make sure nothing is clearing CutoCopyMode.

You might add this before the paste special:

MsgBox (Application.CutCopyMode = xlCopy)

--
Jim
"green fox" wrote in message
ups.com...
| Perhaps I'm just stupid today - this seems like it should be simple
| enough, but nothing has worked so far. Can anyone tell me what I
| missing?
|
| On worksheet one I have run a macro that hides rows, selects a range
| and copies visible cells to the clipboard.
|
| On worksheet two I am trying to run a recorded macro that does a paste
| special, values and transpose. The recorded macro does not work, I've
| tried a number of variations (even changed my security level) and
| nothing is getting me any closer.
|
|
| Here's the code for the macro
|
| test7 Macro
| ' Macro recorded 3/22/2007 by afox
| '
| '
| Windows("Daily News Column to pages.xls").Activate
| Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
| SkipBlanks _
| :=False, Transpose:=True
|
| End Sub
|
|
| here's the result when I run it:
|
|
| run-time error 1004
|
| "Paste special method of range class failed"
|
|
| I would appreciate any help, or even just a clue to point me in the
| right direction.
|
| Thanks in advance
|
| Andy
|