stop calculation on workboook open

G

Guest

Greetings and TIA for your help.
I was hoping to do this with the code below but my workbook still
recalculates when opening, if another workbook (already open) was set to
automatic calculation.
Please advise

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual
End Sub
 
B

Bob Phillips

David,

Did you put this code in the ThsiWorkbook code module?



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

Dave Peterson

I think your workbook is open with the existing calculation setting before it
excel gets to your code.

You could either change the setting manually, then open your workbook

or

create a dummy workbook that changes the setting, opens your workbook and closes
itself. Then use that dummy workbook to open your workbook--don't open your
workbook directly.

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual
workbooks.open(filename:="C:\myworkbook.xls")
thisworkbook.close savechanges:=true
End Sub

Save this once before you run it, or you'll have to type it in again!
 

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