Tim Williams
12/15/2006 2:19:00 AM
.... or only setting calculation back to automatic if it was initally set that way?
In your worksheet_change event handler:
dim bAuto
If application.calculation = xlautomatic
bAuto= true
application .calculation = xlmanual
end if
'.....do stuff
'set back to auto only if required
if bAuto then application.calculation = xlautomatic
--
Tim Williams
Palo Alto, CA
"NickHK" <TungCheWah@Invalid.com> wrote in message news:uLLDxw%23HHHA.3780@TK2MSFTNGP02.phx.gbl...
> Mark,
> What about toggling Application.EnableEvents=False/true ?
>
> NickHK
>
> "Mark VII" <MarkVII@discussions.microsoft.com> wrote in message
> news:7A7A420E-0323-4E48-A25E-D6D5271D60E1@microsoft.com...
> > > Have you tried setting Application.Calculation to manual, making the
> > changes and then setting it back to automatic?
> >
> > Interestingly, I tried to do exactly that. Unfortunately, the Worksheet
> > Change event in the second workbook contains logic where I'm turning
> > calculation off, then on again as part of some special handling of user
> > updates. Consequently, calcuation starts out turned off by the utility
> > program, but the second workbook's Worksheet Change logic turns it back on
> at
> > the end of the sub.
> >
> > Mark
>
>