View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default PasteSpecial failure

Otto, it could be related to sheet protection. The only other thing I can
think of is space, but that usually gives another type error message.

"Otto Moehrbach" wrote:

Excel XP, Win XP
I helped an OP with a workbook containing a lot of code that I wrote.
The code unprotects/protects sheets as needed.
I sent him the file.
He put the file on his computer and the file worked good.
He then put the file in 3 other computers belonging to his co-workers.
That's 5 computers, counting mine. My computer is running XP, all the
others have 2003.
The file works good on 4 of those 5 computers.
The 5th computer produces an error on the line:
Dest.PasteSpecial xlPasteValues
The error is #1004: The pastespecial method of range class failed.
I had him check (with message boxes) that there was something to paste and
that Dest was a valid cell address.
Since the files in the 4 computers are all copies of my file, I can only
surmise that some setting/reference/whatever is different in that one
computer.
Question: Does anyone have any idea of what this could be? Thanks for your
time. Otto