ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to automatically run (https://www.excelbanter.com/excel-discussion-misc-queries/24955-macro-automatically-run.html)

Pam C

Macro to automatically run
 
I have a macro created to pull in information and replace a file. I have
tried to rename it Auto_open to automatically run everytime I open the Excel
workbook named HotWarrants, it doesn't run until I click on the Macro button
I put on the toolbar or go to the Macro menu. Could someone please tell me
what I am doing wrong.

Thanks,

JE McGimpsey

Where is the macro stored?

Auto_Open will fire when stored in a regular code module (i.e., one
created with Insert/Module, not the ThisWorkbook module or a worksheet
module).

Also, Auto macros won't run if the workbook is opened via code, unless
the code includes a call to the RunAutoMacros method.


In article ,
"Pam C" wrote:

I have a macro created to pull in information and replace a file. I have
tried to rename it Auto_open to automatically run everytime I open the Excel
workbook named HotWarrants, it doesn't run until I click on the Macro button
I put on the toolbar or go to the Macro menu. Could someone please tell me
what I am doing wrong.



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

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