Workbook.RunAutoMacros (Excel)

Runs the Auto_Open, Auto_Close, Auto_Activate, or Auto_Deactivate macro attached to the workbook. This method is included for backward compatibility. For new Visual Basic code, you should use the Open, Activate, and Deactivate events and the Close method instead of these macros.

RunAutoMacros (Which)

Which: Specifies the automatic macro to run.


ActiveWorkbook.RunAutoMacros Which:=xlAutoActivate