ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TextToColumns 2000 and 2003 differences? (https://www.excelbanter.com/excel-programming/384752-texttocolumns-2000-2003-differences.html)

Robert[_34_]

TextToColumns 2000 and 2003 differences?
 
Hello,

I have some code that runs perfectly using the TextToColumns function
in Excel 2003. However when I try to run it on another computer with
2000, I get the error

"Run-time error '1004':
Application-defined or object-defined error"

Here is the command it is stuck on...

Selection.TextToColumns Destination:=rUserAcct.Offset(iRowDown, 0),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(21, 1), Array(34, 1),
Array(50, 1), Array(59, 1), _
Array(67, 1), Array(68, 1)), TrailingMinusNumbers:=True

I double checked the selection and it looks correct before it is sent
to this function. Is there missing functionality in 2000 that
supports this command in 2003? If so, there another way to write this
so they will be compatible?


Jim Rech

TextToColumns 2000 and 2003 differences?
 
TrailingMinusNumbers does not exist in Excel 2000.

--
Jim
"Robert" wrote in message
oups.com...
| Hello,
|
| I have some code that runs perfectly using the TextToColumns function
| in Excel 2003. However when I try to run it on another computer with
| 2000, I get the error
|
| "Run-time error '1004':
| Application-defined or object-defined error"
|
| Here is the command it is stuck on...
|
| Selection.TextToColumns Destination:=rUserAcct.Offset(iRowDown, 0),
| DataType:=xlFixedWidth, _
| FieldInfo:=Array(Array(0, 1), Array(21, 1), Array(34, 1),
| Array(50, 1), Array(59, 1), _
| Array(67, 1), Array(68, 1)), TrailingMinusNumbers:=True
|
| I double checked the selection and it looks correct before it is sent
| to this function. Is there missing functionality in 2000 that
| supports this command in 2003? If so, there another way to write this
| so they will be compatible?
|



Robert[_34_]

TextToColumns 2000 and 2003 differences?
 
Thanks! It works again.



All times are GMT +1. The time now is 01:17 PM.

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