Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Turning Off Circular Refrences on open

Hi all,

I have set the max number of Iterations to 1 in calcuation, so I do not get
circular references for a particular workbook, and then turned iterations off
again on close, using the following code...

Private Sub Workbook_Open()

With Application
.Iteration = True
.MaxIterations = 1
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False

End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)

With Application
.Iteration = False
.MaxIterations = 100
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False

End Sub

The problem is that when I open this workbook again, Excel tells me that I
have circuar references before running Workbook_open() which turns on
iterations, as the current setting has iterations turned off, which I toggled
when closing this workbook.

How can I tell excel not to check for circular references BEFORE running the
workbook_open() sub??

Best regards,


Bhupinder


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Turning Off Circular Refrences on open

While the settings are stored with the workbook, they are application level
settings, so only the first workbook opened determines the application level
setting. As you say, code does not run before this is checked. So there is
no way you can do this within the subject workbook.

--
Regards,
Tom Ogilvy


"Bhupinder Rayat" wrote in
message ...
Hi all,

I have set the max number of Iterations to 1 in calcuation, so I do not

get
circular references for a particular workbook, and then turned iterations

off
again on close, using the following code...

Private Sub Workbook_Open()

With Application
.Iteration = True
.MaxIterations = 1
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False

End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)

With Application
.Iteration = False
.MaxIterations = 100
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False

End Sub

The problem is that when I open this workbook again, Excel tells me that I
have circuar references before running Workbook_open() which turns on
iterations, as the current setting has iterations turned off, which I

toggled
when closing this workbook.

How can I tell excel not to check for circular references BEFORE running

the
workbook_open() sub??

Best regards,


Bhupinder




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
excel 07, i don't want circular reference arrows every time I open Zack H Excel Discussion (Misc queries) 1 November 19th 09 08:56 PM
Turning off Circular Error Help eider Excel Discussion (Misc queries) 2 July 28th 05 11:06 PM
Returning Cell Refrences/range Refrences ksnapp[_36_] Excel Programming 2 March 6th 04 07:57 PM
Turning off circular reference warning Craig[_12_] Excel Programming 6 February 10th 04 02:48 PM
remote refrences ian Excel Programming 0 October 3rd 03 12:21 PM


All times are GMT +1. The time now is 12:54 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"