View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Terry von Gease Terry von Gease is offline
external usenet poster
 
Posts: 38
Default Epitaph for Excel, perhaps

"Charles Williams" wrote in message
...
Overall what you describe sounds very similar to many of the applications

I
have written that do not have this problem.
One difference is that I build the app as an XLA addin which contains
worksheets on which I put the blocks of data, formulae, formats etc which
the app uses to create the user workbook.

When creating a sheet for the user I do not copy worksheets but create a

new
one and transfer the required information at the range level, using
Range=Range and copy paste special for the formats, or copy and paste.

Double check that you have switched calculation to manual before doing the
copy/create process ...


Why? Can't Exce'l take care of itself?


Are you using Excel Defined Names, or are the names you enter just text?

Could you give an example of:
- the code you are using to copy
- the formulae you are copying

If Excel crashes in a repeatable way when calculating after data entry and
you are not using any event trapping then you could try and isolate the
problem to a specific formula by (in Manual) doing a sheet calculate to

see
if its a specific sheet, then range.calculate on blocks of formulae etc.
(download my RangeCalc addin if needed)

Voodo checklist:
- Option explicit?


No, we're sufficiently mature and are using precous few ad hoc variables
that, by long practice, always have the same monotonic falvor of names. We
reject out of hand the incredible contrivance and unworkable clumsiness of
Microsoft's naming conventions.

- Do you set all object variables to nothing in reverse container sequence
before exit subs/functions?


No we jus tlet them die. Why would we explicity get rid of them. Once again,
can't Excel trake care of itself?

- Do you use Rob Bovey's code cleaner?


Yes, I finally got it to function. Whatever it's supposed to contribute to
the party it doesn't help here. We remain troubled by the notion of a
package drowning in it's own toxic code waste. This in and of itself is
sufficient reason to regard the authors of any such package as functional
amateurs.

- Do you delete all temp files in %Temp%?


Why?

- What is the size of your .XLB file?


Here you have me. What, exactly, is an XLB file?

- Any other add-ins loaded?


No.

This frenzy of cleaning an polishing as a way to eliminate problems it
troubling to us. It implies that Excel and, by extension, all Microsoft
drivel are delicate things and the precise principles of operation are
largely unknown.

Be that as it may. The problem was solved by some weapons grade
simplifications and doing some things explicitly rather that permitting
Excel to do them en passant. Not very satisfying, but it got the job done.

While we readily admit to being cynical curmedgeons, we do offer many thanks
for your interest. It kept those of us here at the home thinking, in our
crude stumbling way, and made us persevere and not toss the whole thing out.

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley



The application has 8 worksheets, 3 of them very hidden. One of them is
always visible, and the remaining 4 may or may not be visible depending

on
configuration and circumstances.

The problem seems to lurk in one of the usually hidden sheets. What

happens
is after the user uses the application up to the point of invoking the
function that prepares and makes visible this sheet. The function, or

series
of functions actually, that do this pretty much constructs the sheet

from
one of the very hidden sheets. The very hidden sheet is copied over to

the
malfeasant sheet, including lots of cells with lots of conditional [if,
choose, etc.] formulas. There is no problem with cell references coming

over
they are all correct, each and every one of them.

At any rate if I shut off calculations and then invoke the process to

create
the final sheet, all works fine, except there's no meaningful data of
course. If I then provoke the calculations manually, voila, the bugger

dies.

If I leave calculations on and do this it still works and all of the

data
is
right where it's supposed to be and it's all correct. But if I go back

to
the first sheet and attempt to enter another name, either from the

keyboard
or from a menu provided by the application, death once more.

Stepping through in debug or setting judicious breakpoints doesn't tell
much, and seems to subtly alter the internal timing such that it seems

less
likely to fail when messing around with it. it's when this final sheet

is
made visible and activated with normal calculations that the thing sets
itself up to die. Even at that, death comes from other circumstances,

this
is simply the one that I can make happen each and every time. By the
principles of basic debuggery, fix this and the others will most likely

be
fixed as well. If I knew just what in the hell it was doing to itself.

Vis-a-vis trace log, if it's something for me to implement, no. If it's

some
feature of Excel I can't seem to find any reference to it.

Thanks for your interest...

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley