ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2003 vs 2000: PasteSpecial (https://www.excelbanter.com/excel-programming/341759-excel-2003-vs-2000-pastespecial.html)

marcevan

Excel 2003 vs 2000: PasteSpecial
 

Macro in 2003 has this snippet which errors (1004) in Excel 2000:

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

Macro recorded in Excel 2000 has this:

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

Excel 2000 version seems to work OK in 2000 and 2003...2003 only works
in 2003 (not in 2000).

Guessing "xlPasteValuesandNumberFormats" is not 2000 legal.

Just worries about some of the issues I'm reading about with Excel 2000
macros and use of PasteSpecial needed some kind of columnwidth setting
hard coded.


--
marcevan
------------------------------------------------------------------------
marcevan's Profile: http://www.excelforum.com/member.php...o&userid=27766
View this thread: http://www.excelforum.com/showthread...hreadid=472729


Tom Ogilvy

Excel 2003 vs 2000: PasteSpecial
 
That is true on both counts.

--
Regards,
Tom Ogilvy

"marcevan" wrote in
message ...

Macro in 2003 has this snippet which errors (1004) in Excel 2000:

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

Macro recorded in Excel 2000 has this:

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

Excel 2000 version seems to work OK in 2000 and 2003...2003 only works
in 2003 (not in 2000).

Guessing "xlPasteValuesandNumberFormats" is not 2000 legal.

Just worries about some of the issues I'm reading about with Excel 2000
macros and use of PasteSpecial needed some kind of columnwidth setting
hard coded.


--
marcevan
------------------------------------------------------------------------
marcevan's Profile:

http://www.excelforum.com/member.php...o&userid=27766
View this thread: http://www.excelforum.com/showthread...hreadid=472729




Ron de Bruin

Excel 2003 vs 2000: PasteSpecial
 
Hi

Always build in the oldest version

Just worries about some of the issues I'm reading about with Excel 2000
macros and use of PasteSpecial needed some kind of columnwidth setting
hard coded.


For columnwidth you must use the 8

..Cells(1).PasteSpecial Paste:=8
' Paste:=8 will copy the column width in Excel 2000 and higher

also there is a bug with validation, use 6 then


--
Regards Ron de Bruin
http://www.rondebruin.nl


"marcevan" wrote in message
...

Macro in 2003 has this snippet which errors (1004) in Excel 2000:

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

Macro recorded in Excel 2000 has this:

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

Excel 2000 version seems to work OK in 2000 and 2003...2003 only works
in 2003 (not in 2000).

Guessing "xlPasteValuesandNumberFormats" is not 2000 legal.

Just worries about some of the issues I'm reading about with Excel 2000
macros and use of PasteSpecial needed some kind of columnwidth setting
hard coded.


--
marcevan
------------------------------------------------------------------------
marcevan's Profile: http://www.excelforum.com/member.php...o&userid=27766
View this thread: http://www.excelforum.com/showthread...hreadid=472729





All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com