MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Excel 1997 / 2002 Compatibility Issues

  Asked By: Armando    Date: Dec 30    Category: MS Office    Views: 666

I recently wrote a macro to do (amongst other things) clear the contents of a
series of cells on a worksheet in Excel 2002. However when I tried to send the
file to one of my collegues who uses the 97 version, he gets a "runtime error
1004", & the line which seems to be generating the error is as follows:


Any ideas on how to solve this issue?? Sorry if this is an elementary



4 Answers Found

Answer #1    Answered By: Bes Massri     Answered On: Dec 30

Often there is more detail with the error number 1004 - could we have
that please?

It's very likely a compatibility  problem and the first thing I would
investigate (on an Excel97 machine) is removing the dot in the sheet
name and the code. The next thing would be to simplify the range to
say Worksheets("C.Gibbs").Range("c8:h14") and see if the code still
trips up.

ClearContents does exist in XL97 by the way.

Answer #2    Answered By: Naba Malik     Answered On: Dec 30

The exact error message read "Clearcontents method of range class

I've tried removing the dot from the macro & sheet name, and
simplyfying the range element but unfortunatley the same error still

Answer #3    Answered By: Elizabeth Hughes     Answered On: Dec 30

try changing .clearcontents to .select and see if it still trips up.
Probably best to step through the code with F8. The implication in the
error message is that there IS a problem with ClearContents.

None of those cells is protected it it? I get error 1004 if they are,
but excel2003 reports that fact along with the error number - maybe
xl97 isn't so explanatory..

Answer #4    Answered By: Arlene Harvey     Answered On: Dec 30

while trying the ".select" option you
mentioned, I worked out that the reason for the error seemed to be
that there was no data for the macro to delete. This didnt seem to
cause a problem in 2002, but 97 wouldn't run it if there wasnt any
data to delete!

Didn't find what you were looking for? Find more on Excel 1997 / 2002 Compatibility Issues Or get search suggestion and latest updates.