How to avoid calculations?

M

MaxBass #I-D

Here is my problem; I think the hardest thing is to make my problem
clear to you ... ;-)

I have a Word document that contains an embedded Excel object (I'm
working with Office 2003 Pro).

The Excel document contains a VBA function, say Function1 that returns
a value (no matter the type by now and no matter how Function1 works).
In the first worksheet I call that function as it where a "normal"
worksheet function; so in a cell I write "= Function1(<parameter
list>)".
'til know everything works fine.

What I'm tryng to do is to avoid that the function is automatically
calculated (= executed) whenever I activate the emmbedded object inside
the Word document.

I tried every property I know without results.
EnableCalculation = False
Calculation set to xlCalculationManual
ScreenUpdating property set to false.
Nothing.
It looks like the first action performed when the embedded object is
activate is just the calculation.

The problem is that when this calculation is performed the data on
which Function1 operates are not ready yet.

Any suggestion to avoid this kind of problem?

Thank you and best regards to everyone.
 
E

Earl Kiosterud

Max,

Perhaps you shouldn't be using a function, since functions get called when
their arguments change, and you're not ready for it to do its thing.
Perhaps a macro should be run at the proper time, and should put the data
where it's wanted.
 
Top