Preventing Recalculate on open

J

JohnBury

Iam using an Excel workbook from a third party that includes lots of macros
(all of which are protected). When I open the workbook, it recalculates
itself (which takes rather a long time). normally this isn't a problem,
however, I have written some VB code to automate some processes that include
reading data from the workbook, and setting a single value(cell) on certain
worksheets. This value is not involved in any calculations used within the
workbook.

Is there a way to prevent the automatic recalculation so that I can speed up
my automated process (there could be hundreds of instances of this workbook
being opened, read from, updated (one cell remember) and saved in a serial
fashion.

I did once find a registry setting that did what I wanted, but I now cannot
find the reference to it!

Thanks for looking

John
 
T

Tushar Mehta

Maybe...

on error resume next
application.enableevents=false
'open other wb
application.enableevents=true
on error goto 0

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
J

JohnBury

Thanks for the reply, but I'm afraid I don't think it will help my current
problem (may help future stuff though!)

I have literally hundreds of workbooks based on the same third party
template and it wouldn't be worth my while retro fitting this to all of them!

I was hoping for an 'external' solution. As mentioned in my post, I seem to
remember having a registry setting for Excel that stopped Excel going through
a mandatory recalc every time one of these workbooks was loaded.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top