Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default How to stop calculation on open?

Greetings! Have an unwieldy workbook. It is set for manual calculation, no
calculation on save. I'd like to inhibit calculation when opening it as
well, but have been unable to intercept it using the various workbook and
application events. Any suggestions on how to do so?

Thanks,
George


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to stop calculation on open?

Excel picks up that calculation for that session from the first workbook opened.

If you try to use any of that workbook's events, then you'll be too late.

You can change the calculation manually, then open your workbook--or use a
"dummy" workbook that changes calculation mode, then opens your real workbook.

Kind of like:

Option Explicit
Sub auto_open()
application.Calculation =xlCalculationManual
Workbooks.Open Filename:="c:\my documents\excel\book1.xls"
ThisWorkbook.Close savechanges:=False
End Sub



G Lykos wrote:

Greetings! Have an unwieldy workbook. It is set for manual calculation, no
calculation on save. I'd like to inhibit calculation when opening it as
well, but have been unable to intercept it using the various workbook and
application events. Any suggestions on how to do so?

Thanks,
George


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default How to stop calculation on open?

application.EnableEvents = False will do it

just execiute this statement before the workbook open
.... and of course execute
application.EnableEvents = True
when done

here is a quick extract of code where I use it to open all workbooks and
refresh DLL references

Application.EnableEvents = False
...
Set wb = Workbooks.Open(sPath & sFile, updatelinks:=0)
If Not wb Is Nothing Then
If wb.ReadOnly Then
rngScanned.Cells(lngRow, 6) = "Read-only"
Else
strResult = RefreshCOMLibraryReference(wb)
....
....
....


e.g.

"G Lykos" wrote:

Greetings! Have an unwieldy workbook. It is set for manual calculation, no
calculation on save. I'd like to inhibit calculation when opening it as
well, but have been unable to intercept it using the various workbook and
application events. Any suggestions on how to do so?

Thanks,
George



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I open Excel, workbooks open automatically. How can I stop t Rhealbird Excel Discussion (Misc queries) 2 February 23rd 06 10:08 AM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM
stop calculation on workboook open David Excel Programming 2 November 25th 04 01:59 PM
stop calculation Claude Excel Programming 0 May 6th 04 03:18 PM
Workbooks.Open / .Open Text - How do you stop the .xls addition? Dave[_20_] Excel Programming 2 July 31st 03 04:03 AM


All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"