![]() |
Start Excel Macro upon opening of document
This is likely quite a simple question, but I have not been able to find this
in the online help of Excel or on the boards. I have built a nice little Excel app to display some real time data. The macro works wonderfully and I am very statisfied with it. What I need to do is lauch that particular macro whenever this document is opened. I am trying to make this as easy as possible for my end user, and this would surely do it. TIA! |
Start Excel Macro upon opening of document
Open Event
See AlsoApplies ToExampleSpecifics Occurs when the workbook is opened. Private Sub Workbook_Open() Example This example maximizes Microsoft Excel whenever the workbook is opened. Private Sub Workbook_Open() Application.WindowState = xlMaximized End Sub -- Gary "Brett" wrote in message ... This is likely quite a simple question, but I have not been able to find this in the online help of Excel or on the boards. I have built a nice little Excel app to display some real time data. The macro works wonderfully and I am very statisfied with it. What I need to do is lauch that particular macro whenever this document is opened. I am trying to make this as easy as possible for my end user, and this would surely do it. TIA! |
Start Excel Macro upon opening of document
Thanks, but forgive my ignorance on this stuff....
Where do I put this code? In the same module as my other code? For arguement, lets call my macro I want to start "EZMAC". Should the full code look like this: Open Event Private Sub Workbook_Open() EZMAC End Sub Is there a special place to put these modules? Thanks again. "Gary Keramidas" wrote: Open Event See AlsoApplies ToExampleSpecifics Occurs when the workbook is opened. Private Sub Workbook_Open() Example This example maximizes Microsoft Excel whenever the workbook is opened. Private Sub Workbook_Open() Application.WindowState = xlMaximized End Sub -- Gary "Brett" wrote in message ... This is likely quite a simple question, but I have not been able to find this in the online help of Excel or on the boards. I have built a nice little Excel app to display some real time data. The macro works wonderfully and I am very statisfied with it. What I need to do is lauch that particular macro whenever this document is opened. I am trying to make this as easy as possible for my end user, and this would surely do it. TIA! |
Start Excel Macro upon opening of document
just put your code in between this
Sub auto_open() code here End Sub -- Gary "Brett" wrote in message ... Thanks, but forgive my ignorance on this stuff.... Where do I put this code? In the same module as my other code? For arguement, lets call my macro I want to start "EZMAC". Should the full code look like this: Open Event Private Sub Workbook_Open() EZMAC End Sub Is there a special place to put these modules? Thanks again. "Gary Keramidas" wrote: Open Event See AlsoApplies ToExampleSpecifics Occurs when the workbook is opened. Private Sub Workbook_Open() Example This example maximizes Microsoft Excel whenever the workbook is opened. Private Sub Workbook_Open() Application.WindowState = xlMaximized End Sub -- Gary "Brett" wrote in message ... This is likely quite a simple question, but I have not been able to find this in the online help of Excel or on the boards. I have built a nice little Excel app to display some real time data. The macro works wonderfully and I am very statisfied with it. What I need to do is lauch that particular macro whenever this document is opened. I am trying to make this as easy as possible for my end user, and this would surely do it. TIA! |
Start Excel Macro upon opening of document
The code should go in the ThisWorkbook code module.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Brett" wrote in message ... Thanks, but forgive my ignorance on this stuff.... Where do I put this code? In the same module as my other code? For arguement, lets call my macro I want to start "EZMAC". Should the full code look like this: Open Event Private Sub Workbook_Open() EZMAC End Sub Is there a special place to put these modules? Thanks again. "Gary Keramidas" wrote: Open Event See AlsoApplies ToExampleSpecifics Occurs when the workbook is opened. Private Sub Workbook_Open() Example This example maximizes Microsoft Excel whenever the workbook is opened. Private Sub Workbook_Open() Application.WindowState = xlMaximized End Sub -- Gary "Brett" wrote in message ... This is likely quite a simple question, but I have not been able to find this in the online help of Excel or on the boards. I have built a nice little Excel app to display some real time data. The macro works wonderfully and I am very statisfied with it. What I need to do is lauch that particular macro whenever this document is opened. I am trying to make this as easy as possible for my end user, and this would surely do it. TIA! |
All times are GMT +1. The time now is 04:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com