Old Excel 2000 macro won't run under Windows XP

G

Guest

I have an old, very large macro, programmed using Excel Functions, which
exists in a .xlm sheet in Excel 2000. It has run successfully since 1993 and
ran successfully on Excel 2000 when I had an earlier version of Windows. I
reinstalled Office 2000 under Windows XP and the macro no longer runs,
producing a spurious error message. "Stepping through" the macro shows that
what is really happening is that the data references, intended to apply to
the .xls sheet, are being interpreted as references to the .xlm sheet, so
that cells in the .xlm sheet are being manipulated and deleted instead of the
correct cells in the .xls sheet.

I've tried using the "activate" function to point the macro to the .xls
sheet, but that does not change anything.

How do I now get the macro to process the .xls sheet instead of the .xlm
sheet?
 
J

Jim Rech

I have a ton of old Excel 4 code that runs just fine under any Excel version
under any Windows version. Excel 4 code often operates on the active sheet.
Make sure when running your code that the worksheet is active. If you would
testing code by firing a macro while the macro sheet was active I could see
it having the effect you're seeing.

--
Jim
|I have an old, very large macro, programmed using Excel Functions, which
| exists in a .xlm sheet in Excel 2000. It has run successfully since 1993
and
| ran successfully on Excel 2000 when I had an earlier version of Windows. I
| reinstalled Office 2000 under Windows XP and the macro no longer runs,
| producing a spurious error message. "Stepping through" the macro shows
that
| what is really happening is that the data references, intended to apply to
| the .xls sheet, are being interpreted as references to the .xlm sheet, so
| that cells in the .xlm sheet are being manipulated and deleted instead of
the
| correct cells in the .xls sheet.
|
| I've tried using the "activate" function to point the macro to the .xls
| sheet, but that does not change anything.
|
| How do I now get the macro to process the .xls sheet instead of the .xlm
| sheet?
|
|
 
G

Guest

After further investigation and recollection: I may not have run these macros
on Excel 2000 after all, but I did so on previous versions. I've emailed the
files to a friend who uses Excel 2003 with XP, and the macros run just fine.
I definitely activate the .xls sheet at the beginning.

In Excel 2000, when I "step through" the macro, the dialog box shows the
cell in the macro sheet which is about to be executed. These "addresses"
proceed correctly down column A for 3 or 4 steps, then inexplicably jump to
column V in the macro sheet (which contains nothing), resulting in an error
message "no return() or halt() function found on macro sheet".

Do you have Excel 2000, and if so, would it be possible to email you one of
these Excel files to try? I have one with a small, 14-step macro that would
be very easy to test.

Thanks,
John
 

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

Top