Excel quitting due to error of type 2 unless I enter then leave VB editor

K

Ken Johnson

I recently put together some code that transposes a song's guitar
chords to a new key chosen from a userform. I use Excel 2001 on a G3
iMac (OS 9.2.1). It was working OK and continues to work OK on PCs.
Now, on my iMac, when I run the macro that transposes the chords I get
the message that Excel has unexpectedly quit because of error of type
2. However, the error does not occur if after opening the workbook I
enter the VB editor (Alt + F11) then exit the same way without having
done anything in the VB editor.
Does anybody have any idea as to how I might go about correcting this
problem?
Deleting and reinstalling Excel did nothing.
The error occurs under other circumstances with this workbook, but
these other circumstances are a bit harder to describe. I'm hoping that
the solution to the first problem will be a cure all.
Ken Johnson
 
B

Bob Greenblatt

I recently put together some code that transposes a song's guitar
chords to a new key chosen from a userform. I use Excel 2001 on a G3
iMac (OS 9.2.1). It was working OK and continues to work OK on PCs.
Now, on my iMac, when I run the macro that transposes the chords I get
the message that Excel has unexpectedly quit because of error of type
2. However, the error does not occur if after opening the workbook I
enter the VB editor (Alt + F11) then exit the same way without having
done anything in the VB editor.
Does anybody have any idea as to how I might go about correcting this
problem?
Deleting and reinstalling Excel did nothing.
The error occurs under other circumstances with this workbook, but
these other circumstances are a bit harder to describe. I'm hoping that
the solution to the first problem will be a cure all.
Ken Johnson
If you are using Excel and VBA in an OS 9 environment, assign at least 80MB
of memory to Excel. Also insure that virtual memory is turned on, and set to
1MB larger than actual total RAM size. Excel's performance will improve
noticeably.
 
K

Ken Johnson

Cybertaz,
Thanks for that, I'm going to try the 9.2.2 update as soon I can. I
increased the memory tenfold but that hasn't helped.
Ken Johnson
 
K

Ken Johnson

Bob,
Thanks for that, I'll try your recommended settings as well as the
9.2.2 update and see how that goes.
Ken Johnson
 

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