ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro import (https://www.excelbanter.com/excel-programming/273862-macro-import.html)

Lynn[_2_]

Macro import
 
I wrote a macro in XP to import data from one excel file
to another excel. The macro runs fine in XP but I keep
getting this error in 2000.

Run-time error 438
Object doesn't support this property or method.

When I click debug it takes me to this line of code:

..SourceDataFile = "E:\filepath\filename.xls"



Richard Choate

Macro import
 
There are a number of methods which are not available in 97. This is likely
one of them.
--
HTH
Richard Choate, CPA

"Lynn" wrote in message
...
I wrote a macro in XP to import data from one excel file
to another excel. The macro runs fine in XP but I keep
getting this error in 2000.

Run-time error 438
Object doesn't support this property or method.

When I click debug it takes me to this line of code:

..SourceDataFile = "E:\filepath\filename.xls"




Chip Pearson

Macro import
 
Lynn,

The SourceDataFile property was added in Excel 2002. It doesn't
exist in earlier versions. If you need to support earlier
versions, you can't use SourceDataFile.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Lynn" wrote in message
...
I wrote a macro in XP to import data from one excel file
to another excel. The macro runs fine in XP but I keep
getting this error in 2000.

Run-time error 438
Object doesn't support this property or method.

When I click debug it takes me to this line of code:

.SourceDataFile = "E:\filepath\filename.xls"





Lynn[_2_]

Macro import
 
It works now. I removed the line of code causing the
error. I recorded the macro and it wrote the line of code
but the macro runs without it so I am not sure what that
line was for.


-----Original Message-----
I wrote a macro in XP to import data from one excel file
to another excel. The macro runs fine in XP but I keep
getting this error in 2000.

Run-time error 438
Object doesn't support this property or method.

When I click debug it takes me to this line of code:

..SourceDataFile = "E:\filepath\filename.xls"


.



All times are GMT +1. The time now is 12:59 PM.

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