| Excel Abort When Starting
BoatRecords |
| On occasion when BoatRecords is started (by clicking on the
Records button) Excel will abort. Excel normally will
close and restart with the BoatRecords files recovered.
Once this situation occurs it normally persists. Every time
BoatRecords is started Excel aborts. This happens in both
the Office 2003 and Office 2007 environments. It happens
under Winxp and Win7 (in native and xp emulation mode). I
have not been able to determine the cause of this problem.
Whenever I use the VBA Editor to trap the problem the abort does not
happen and if fact normally goes away. Currently the only
way I can clear this condition is to use the VBA Editor.
My guess is that there is a memory allocation bug in Excel that
at time allows the BoatRecords application to overlay some of
the Excel code, producing the abort. Loading the VBA
editor seems to force a different memory allocation and clears
the condition. That's only a guess on my part. I
haven't found any support for that guess on the various Office
user forums, and the fact that it happens in both Office 2003
and 2007 makes me more than a little skeptical that it is an
Excel problem. So I'll keep looking for a fix or
some support for the Excel bug explanation. |
| In the meantime, using the VBA Editor is the only
work-around I have been able to come up with. The
following are the steps I use to cause the Excel abort to stop
(at least for awhile). |
|
1. After loading the BoatRecordsVBA workbook (the Records
button is visible in either the Excel 2003 bottom Menu Bar
or on the Excel 2007 ribbon) start the VBA Editor as shown
below.
|
|
If
you are using Excel 2003 the VBA Editor is normally started by
the Tools/Macro menu selctions as show in the screen capture on
the right.
|
|
If
you are using Excel 2007 the VBA Editor is normally started
under the Developer tab on the ribbon as shown on the right.
Sometimes it is only necessary to open the VBA Editor and then
click on the Records button to successfully start the program.
Other times it is necessary to create a breakpoint in the
program, which is described in the following step.
|
|
2. The following steps are depicted using the
VBA Editor in Excel 2007. The appearance and operation of
the Editor in Excel 2003 is identical.
|
|
In
the upper left window of the Editor is a list of the Worksheets,
forms and modules that make up the BoatRecords application.
Click on the "+" next to the "Modules" open this list.
Then double click on the BoatRecords module as shown on the
right. This will open the code window. Scroll down
until you come to the line "Public Sub StartWork"
Click on the grey margin just to the left of
either of the two statements under the "StartWork" line. I
have clicked on the statement that says "Startform.Show".
This establishes a Breakpoint in the program at this statement.
Setting a Breakpoint at the line above should work as well.
|
|
3. Now go back to the Excel Window and click
on the Records button to start the application.
|
|
This
should immediately re-open the VBA Editor window and the yellow
highlight should show the program execution has stopped at the
Breakpoint as shown in the capture on the right.
|
|
Now
press the F5 function key or use the Run/Run Sub/Userform menu
selection. This allows the BoatRecords program to continue
execution and should bring up the program form without the Excel
abort.
At this point, close the VBA Editor window to
clear the Breakpoint and the BoatRecords program should run
normally. In my experience with this bug, BoatRecords
should continue to run without causing an Excel abort until
something changes in the environment and the problem returns.
|