View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default public property in one workbook, want to set value from anothe

.... 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" wrote in message ...
Mark,
What about toggling Application.EnableEvents=False/true ?

NickHK

"Mark VII" wrote in message
...
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