ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VB code to set iteration (https://www.excelbanter.com/excel-discussion-misc-queries/91020-vbulletin-code-set-iteration.html)

Ken G.

VB code to set iteration
 
I need to ensure that iteration is "on" when a particular workbook opens.
I've read the thread between Sharkfoot and Sandy Mann, but all I'm looking
for is some code that will activate when the spreadsheet opens, to set
iteration "on" before it checks for circular references.



John

VB code to set iteration
 
try putting this in...

Private Sub Workbook_Open()
With Application
.Iteration = True
.MaxIterations = 100
.MaxChange = 0.001
End With
End Sub

"Ken G." wrote:

I need to ensure that iteration is "on" when a particular workbook opens.
I've read the thread between Sharkfoot and Sandy Mann, but all I'm looking
for is some code that will activate when the spreadsheet opens, to set
iteration "on" before it checks for circular references.



Ken G.

VB code to set iteration
 
Thanks John, but this didn't work. Where should the macro go? I tried it in
the worksheet, and in a module but it didn't set the iteration.

"John" wrote:

try putting this in...

Private Sub Workbook_Open()
With Application
.Iteration = True
.MaxIterations = 100
.MaxChange = 0.001
End With
End Sub

"Ken G." wrote:

I need to ensure that iteration is "on" when a particular workbook opens.
I've read the thread between Sharkfoot and Sandy Mann, but all I'm looking
for is some code that will activate when the spreadsheet opens, to set
iteration "on" before it checks for circular references.



Roger Govier

VB code to set iteration
 
Hi Ken

You need to put the code in the This Workbook module, not a sheet
module.

--
Regards

Roger Govier


"Ken G." wrote in message
...
Thanks John, but this didn't work. Where should the macro go? I tried
it in
the worksheet, and in a module but it didn't set the iteration.

"John" wrote:

try putting this in...

Private Sub Workbook_Open()
With Application
.Iteration = True
.MaxIterations = 100
.MaxChange = 0.001
End With
End Sub

"Ken G." wrote:

I need to ensure that iteration is "on" when a particular workbook
opens.
I've read the thread between Sharkfoot and Sandy Mann, but all I'm
looking
for is some code that will activate when the spreadsheet opens, to
set
iteration "on" before it checks for circular references.






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com