ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Run automated macros (https://www.excelbanter.com/excel-discussion-misc-queries/103209-run-automated-macros.html)

ledzepe

Run automated macros
 

Hi everyone,

How do you run a macro automatically when you open up an Excel file?

Thanks in advance.


--
ledzepe
------------------------------------------------------------------------
ledzepe's Profile: http://www.excelforum.com/member.php...o&userid=25207
View this thread: http://www.excelforum.com/showthread...hreadid=568427


Excelenator

Run automated macros
 

Place the name of your macro in the This Workbook object in the
Workbook_Open event.

To do this right click the excel icon next to the File menu command and
select view code. Select Workbook from the drop down box at the top
middle of the VBE. The Workbook_Open even macro code will be inserted
and you can paste your code there. Save the workbook and close it and
the next time you open it the code will execute.


--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=568427



All times are GMT +1. The time now is 07:16 PM.

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