run time error 1004

M

meagain

I was told the following about a macro I built: If you build a large portion of your macros with the macro recorder in a newer version of Excel, then the code will use the "new" arguments which will cause problems in older versions. I was getting a run-time error 1004, when the file was opened in an older version of Excel. Is there a solution to change this file so it will work with older versions when opened

Thank
 
C

Chip Pearson

You need to manually change the offending code so that it will
work in earlier versions. There is no way to record a macro to
produce code guaranteed to be compatible with earlier versions.
Also, there is no way to automatically change code to be
compatible with earlier versions. It is strictly a manual
process.


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


meagain said:
I was told the following about a macro I built: If you build
a large portion of your macros with the macro recorder in a newer
version of Excel, then the code will use the "new" arguments
which will cause problems in older versions. I was getting a
run-time error 1004, when the file was opened in an older version
of Excel. Is there a solution to change this file so it will work
with older versions when opened?
 
M

meagain

Thanks, but Im not sure what you mean by manually change the offending code

Thanks
 
C

Chip Pearson

You have to go in to the recorded code and change the code so
that it will work with earlier versions. You must do it yourself;
there is no automatic way to do this.


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

meagain

Are you saying I go into the code a type the same thing in as is there and erase the old?
 
C

Chip Pearson

No. If you have recorded code that works in Excel 2002, for
example, but not in Excel 2000 or another earlier version, you
need to modify the Excel 2002 code so that it will run in the
earlier version.



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



meagain said:
Are you saying I go into the code a type the same thing in as
is there and erase the old?
 
Top