Auto_Open

You should not use the Auto_Open event as this is for backwards compatibility.


Excel

In Excel this procedure runs when a workbook is opened.
You should use the Workbook_Open event instead.
This will not run if the workbook is opened using code.


Infact any subroutine with the prefix "Auto_Open" will run automatically

Public Sub Auto_Open_PleaseRunThisEverytime() 


If you are opening a workbook using code then the Auto_Open macros will not run automatically.
If you want the Auto_Open macro to run you need to call it explicitly.

Workbooks.Open 
ActiveWorkbook.RunAutoMacros xlRunAutoMacro.xlAutoOpen


Word (AutoOpen)

In Word this has an equivalent procedure called AutoOpen.
You should use the Document_Open event instead.


Word.wdAutoMacros.wdAutoOpen 


Occurs when you open the document.
If you save this macro in a template it will run every time you attempt to open the template or any document based on that template.
The Document_Open event procedure is equivalent to the AutoOpen event.



PowerPoint

In PowerPoint the Auto_Open is only recognised in add-ins (.ppa) and not in normal presentations (.ppt)
Our productivity add-in can detect if this subroutine has been added to a regular presentation and runs it when it is opened.



© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited

Top

PrevNext