Excel 97 compatibility

C

Chris

I have the the following error in Excel 97 (below) when running a macro
created in Version 2002. The code line is

Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False,
Transpose:=False

Error
Runtime error 1004 PasteSpecial method of range class failed

Can you help on this and tell me what needs to be changed in the line of code
above. The code is doing a past special of values and number formats ony

Cheers
Chris
 
D

Don Guillett

Have a look at a manual copy/paste in xl97 and you will see that this is not
an option in xl97. So, try pasting values and then pasting formats.

..PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
..PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
 
D

Don Guillett

I didn't say manual. I said manual. So, I guess it depends on what your
definition of is is....

I didn't mean to read a manual. I meant to do it manually. The dialog box
will not show that option.
 
C

Chris

Oops
What I'll do is record a macro in 97 and then paste into my macro. This
should do the trick

Cheers
Chris
 
C

Chris

tried it but didn't work. I may copie in correctly, but many thanks I now hve
it running on an old version, I cannot help feel that I have taken a backward
step and should have got my mate to upgrade. oh well

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top