Compatibility with Excel 97 Questions

  • Thread starter Thread starter Ken Loomis
  • Start date Start date
K

Ken Loomis

I am using Excel 2003, but I need to be sure what I write in VBA will run on
a machine with Excel 97.

Is there a reference somewhere that talks about how to make your programs
compatible with older versions of Excel?

Thanks,
Ken Loomis
 
Ken,

Do you not have an Excel97 machine that you can develop on? It is better
than trying to ensure backwards compatibility.
 
Actually, I don't have a machine with Office 97 on it. I am trying to get a
copy of Excel 97 for that purpose, but this project is actually just a
freebie for a friend whose IT department said it couldn't be done. I just
laughed when she told me that. I had never programmed in VBA before last
weekend when I started on this. With about 20 hours of programming (and lots
of help from this newsgroup, thanks for all the help), I have a complete
package that combines 4 separate db query results files into one report,
complete with lots of editing and formatting. It used to take her two hours
to do this by hand and she had to do it once a week. Now it will take her 2
minutes. But now I find out that they only have Excel 97, but why does that
surprise me when the IT department said this couldn't be done.

There only seems to be a couple of incompatibilities in the arguments for a
couple of calls. 'Sort' being one of them I know about for sure. So I was
hoping I could find a reference that told about the incompatibilities.

Thanks,
Ken Loomis
 
Ken,

Don't know of a surefire reference, just experience of what it doesn't have,
like the Split method.

I suppose you want to get it running before moving the XL97 machine?
 
I have it running now on an XP box with Excel 2003.

I am pretty sure I have an old copy of office '97 around here somewhere, and
an old box with Win 98 on it that I could setup, It's just that I was hoping
to have this for her to use tomorrow. And finding where I put that CD is
going to be the challenge. I never thought I'd need it again.

A workaround is for her to FTP the files and I run it and FTP back the
results. So either way it'll happen.

Thanks for the comments.

Ken Loomis
 
The type of incompatibilities you speak of are usually caused because
additional options have been added in later versions and would not be
recognized by Excel 97. this would usually be where you have recorded the
macro. for example, the arguments xl97 recognizes for sort are:

expression.Sort(Key1, Order1, Key2, Type, Order2, Key3, Order3, Header,
OrderCustom, MatchCase, Orientation, SortMethod, IgnoreControlCharacters,
IgnoreDiacritics, IgnoreKashida)

for Find:

expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection,
MatchCase, MatchByte)

if you are using querytables and recorded the creation of those, you will
find problems there.


If you try your FTP method, you will work these errors out, one error at a
time. She will compile and get the error. Notify you. Fix and start
again.
 
Hi Ken

I like you "don't accept not possible" approach

Don't think you need to install w98 to run xl97, should run on all
versions of windows from W95 to XP. BUT I'm pretty sure it's not a good
idea to install earlier versions of Excel after later versions (other
way round is OK).

Regards,
Sandy
 
Thanks, Tom. I think you might have hit the nail on the head.

Here is a recorded Sort in the 2003 version:

Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


If I understand your comments, the "DataOption1:=xlSortNormal" could be the
problem and using this instead could fix that:

Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

And I don't think that would effect the result.

Am I right?

Also, I was thinking of FTP'ing the other way. Until we get this fixed,
she'd send me the raw data files and I'd run the report and email it back to
her. She has no problem opening and printing the file in Excel '97, just
can't run the macros. And, actually, she can run most of the utilities I
have added, just not the main macro that does most of the work.

Thanks,
Ken Loomis
 
Thanks, Sandy.

A very long time ago I learned that everything is just a SMOP.

And I wasn't going to install Win 98. It's just that I do not want to
install Office '97 on my XP machine that already has Office 2003 on it. I
had an old box with Wind 98se already on it, so I drug it out and hooked up
a KVM switch only to find that even it has Office 2000 on it. So now I just
need to dig around and find Office '97.

We'll get there.

Just remember, everything is just a SMOP (small matter of programming).

Ken Loomis
 
Tom,

That was it. I finally found my Office '97 CD and installed it.

I had already made the changes you suggested with the 'Sort' and that was
the only problem. Runs fine.

Thanks for all the help you, and everyone else here on this newsgroup, have
given me on this project. I'd like to say I'm done with it, but I recall
reading someplace that:

"You are never done with an Excel spreadsheet, you just stop working on it
at some point."

Ken Loomis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top