Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Force iteration in workbook

I have a workbook that is shared and required iteration to be turned on for
the date calculations to work. How can I force this on everytime the
workbook is opened?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Force iteration in workbook

You could create a new workbook that changes the calculation mode and then opens
the workbook that you want.

After it's done it's work, the macro would close the new workbook.

Option Explicit
Sub Auto_Open()

Dim TempWkbk As Workbook
Dim Wkbk As Workbook
Dim IsThereAnActiveWork As Boolean

Set TempWkbk = Nothing
On Error Resume Next
Set TempWkbk = ActiveWorkbook
On Error GoTo 0

If TempWkbk Is Nothing Then
IsThereAnActiveWork = False
Set TempWkbk = Workbooks.Add(1)
Else
IsThereAnActiveWork = True
End If

With Application
.Calculation = xlManual
.MaxChange = 0.001
End With

Set Wkbk = Workbooks.Open(Filename:="c:\my documents\excel\book1.xls")

If IsThereAnActiveWork = True Then
'do nothing
Else
TempWkbk.Close savechanges:=False
End If

ThisWorkbook.Close savechanges:=False

End Sub

Then open this helper workbook instead of opening the real workbook.




gump wrote:

I have a workbook that is shared and required iteration to be turned on for
the date calculations to work. How can I force this on everytime the
workbook is opened?


--

Dave Peterson
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
How to force workbook to always open on the index sheet tab p1518 Excel Worksheet Functions 2 November 9th 06 01:00 AM
Force a Readonly Workbook to save to a different folder Charlotte Howard Excel Discussion (Misc queries) 6 August 23rd 06 04:41 PM
How can force enable macros to be able to open my workbook? kcdonaldson Excel Discussion (Misc queries) 3 December 5th 05 06:16 PM
Force content in closed workbook Nigel Excel Discussion (Misc queries) 1 May 16th 05 06:01 PM
How do I force a reload of the workbook? Bill Le May New Users to Excel 1 March 25th 05 12:56 AM


All times are GMT +1. The time now is 07:38 AM.

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

About Us

"It's about Microsoft Excel"