ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   a macro that runs automatically when a workbook is opened (https://www.excelbanter.com/excel-programming/432541-macro-runs-automatically-when-workbook-opened.html)

david netser

a macro that runs automatically when a workbook is opened
 
i am trying to write a macro which will turn on Iteration whenever a workbook
is opened, i have written the following:
Private Sub Workbook_Open()

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

End Sub

and it doesnt work, would you know why?

Gary''s Student

a macro that runs automatically when a workbook is opened
 
Make sure you have installed the macro in the workbook code area and not a
standard module.
--
Gary''s Student - gsnu200860


"david netser" wrote:

i am trying to write a macro which will turn on Iteration whenever a workbook
is opened, i have written the following:
Private Sub Workbook_Open()

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

End Sub

and it doesnt work, would you know why?


david netser

a macro that runs automatically when a workbook is opened
 
many thanks, it worked perfectly. david

"Gary''s Student" wrote:

Make sure you have installed the macro in the workbook code area and not a
standard module.
--
Gary''s Student - gsnu200860


"david netser" wrote:

i am trying to write a macro which will turn on Iteration whenever a workbook
is opened, i have written the following:
Private Sub Workbook_Open()

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

End Sub

and it doesnt work, would you know why?



All times are GMT +1. The time now is 12:49 PM.

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