Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default 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!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default 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!






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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!








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Excel document Sallie[_2_] Excel Discussion (Misc queries) 2 August 25th 09 03:48 PM
Opening a Word Document using an Excel (2000) Macro? ekreider Excel Discussion (Misc queries) 4 January 5th 08 04:41 AM
Macro Folder Not Opening on Start Up Darren H Excel Discussion (Misc queries) 1 June 25th 07 03:04 PM
How to auto start a new Excel image or window when opening files Robert in Phoenix Setting up and Configuration of Excel 5 May 30th 05 12:09 AM
macro to start on workbook opening Nigel Excel Discussion (Misc queries) 1 May 13th 05 12:39 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"