Starting a Makro automatically

A

anand288

Hello,

I would like to run a Macro automatically after opening a Workbook, to
set the "Iteration" Option.

I found the following code :
Private Sub Workbook_Open()
Application.Iteration = True
End Sub

However I can't get Excel to start this macro when the workbook gets
opened. I have to start the macro manually.

All help would be graetly appreciated.

Cheers,
Anan dPatel
 
D

Dave Peterson

Did you put it behind the ThisWorkbook module?

Did you make sure your macro security settings were either low or Medium (and
you allowed macros)?
 
A

anand288

I did not quite understand your Question. The Makro was added by
starting the VB-Editor while the workbook was open and adding a module
and a private sub procedure.
In the Project-Window of the editor I can see two folders: the first
folder with the Objects "This Workbook" and three tables and the second
folder with "Module1" which has my Makro in it as a "Private sub"

The security settings are on "low"
 
G

Guest

Sub auto_open()

Application.Iteration = True

End Sub





I did not quite understand your Question. The Makro was added by
starting the VB-Editor while the workbook was open and adding a module
and a private sub procedure.
In the Project-Window of the editor I can see two folders: the first
folder with the Objects "This Workbook" and three tables and the second
folder with "Module1" which has my Makro in it as a "Private sub"

The security settings are on "low"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top