#1   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 390
Default Startup Macro

I want to create a startup or automatic macro in Excel 2003. I have looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not just a
regular macro?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Startup Macro

Look in the ThisWorkbook module for workbook_open or create an auto_open
macro

--
Don Guillett
SalesAid Software

"Max" wrote in message
...
I want to create a startup or automatic macro in Excel 2003. I have looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not just a
regular macro?

Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 390
Default Startup Macro

I see the Workbook Open in VB. Can I do one by recording using
Tools/Macro/Record?



"Don Guillett" wrote:

Look in the ThisWorkbook module for workbook_open or create an auto_open
macro

--
Don Guillett
SalesAid Software

"Max" wrote in message
...
I want to create a startup or automatic macro in Excel 2003. I have looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not just a
regular macro?

Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Startup Macro

Record the macro then wrap it inside the Workbook_Open

i.e.

Sub Macro1()
'do the steps
End Sub

In Thisworkbook hit Workbook in left-side dialog to get

Private Sub Workbook_Open()

End Sub

Stick Macro1 between the lines or copy the "steps" from Macro1.

Private Sub Workbook_Open()
Macro1
End Sub

Private Sub Workbook_Open()
'do the steps
End Sub

Either one will work, but the second method means you don't have to save Macro1


Gord Dibben MS Excel MVP


On Wed, 23 May 2007 16:17:00 -0700, Max wrote:

I see the Workbook Open in VB. Can I do one by recording using
Tools/Macro/Record?



"Don Guillett" wrote:

Look in the ThisWorkbook module for workbook_open or create an auto_open
macro

--
Don Guillett
SalesAid Software

"Max" wrote in message
...
I want to create a startup or automatic macro in Excel 2003. I have looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not just a
regular macro?

Thanks in advance.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Startup Macro

Might even skip a step - when you start recording your macro and have a
prompt to give it a name, enter Auto_Open as the name. Then record your
macro. It'll run when you open the workbook - still works even in 2007!

But somehow associating it with the Workbook_Open() event is generally the
standard way of doing things these days.

"Gord Dibben" wrote:

Record the macro then wrap it inside the Workbook_Open

i.e.

Sub Macro1()
'do the steps
End Sub

In Thisworkbook hit Workbook in left-side dialog to get

Private Sub Workbook_Open()

End Sub

Stick Macro1 between the lines or copy the "steps" from Macro1.

Private Sub Workbook_Open()
Macro1
End Sub

Private Sub Workbook_Open()
'do the steps
End Sub

Either one will work, but the second method means you don't have to save Macro1


Gord Dibben MS Excel MVP


On Wed, 23 May 2007 16:17:00 -0700, Max wrote:

I see the Workbook Open in VB. Can I do one by recording using
Tools/Macro/Record?



"Don Guillett" wrote:

Look in the ThisWorkbook module for workbook_open or create an auto_open
macro

--
Don Guillett
SalesAid Software

"Max" wrote in message
...
I want to create a startup or automatic macro in Excel 2003. I have looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not just a
regular macro?

Thanks in advance.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Startup Macro

Good point Jerry

Never thought of naming to Auto_open and leaving in the general module.

I'm sure happy there are many of us around here for alternative ideas<g


Gord


On Wed, 23 May 2007 17:13:01 -0700, JLatham <HelpFrom @
Jlathamsite.com.(removethis) wrote:

Might even skip a step - when you start recording your macro and have a
prompt to give it a name, enter Auto_Open as the name. Then record your
macro. It'll run when you open the workbook - still works even in 2007!

But somehow associating it with the Workbook_Open() event is generally the
standard way of doing things these days.

"Gord Dibben" wrote:

Record the macro then wrap it inside the Workbook_Open

i.e.

Sub Macro1()
'do the steps
End Sub

In Thisworkbook hit Workbook in left-side dialog to get

Private Sub Workbook_Open()

End Sub

Stick Macro1 between the lines or copy the "steps" from Macro1.

Private Sub Workbook_Open()
Macro1
End Sub

Private Sub Workbook_Open()
'do the steps
End Sub

Either one will work, but the second method means you don't have to save Macro1


Gord Dibben MS Excel MVP


On Wed, 23 May 2007 16:17:00 -0700, Max wrote:

I see the Workbook Open in VB. Can I do one by recording using
Tools/Macro/Record?



"Don Guillett" wrote:

Look in the ThisWorkbook module for workbook_open or create an auto_open
macro

--
Don Guillett
SalesAid Software

"Max" wrote in message
...
I want to create a startup or automatic macro in Excel 2003. I have looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not just a
regular macro?

Thanks in advance.





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Startup Macro

Let's not forget

Workbooks.Open(workbookname & ".xls")
won't run the auto_open

Workbooks.Open(workbookname & ".xls").RunAutoMacros xlAutoOpen
will
--
Don Guillett
SalesAid Software

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Good point Jerry

Never thought of naming to Auto_open and leaving in the general module.

I'm sure happy there are many of us around here for alternative ideas<g


Gord


On Wed, 23 May 2007 17:13:01 -0700, JLatham <HelpFrom @
Jlathamsite.com.(removethis) wrote:

Might even skip a step - when you start recording your macro and have a
prompt to give it a name, enter Auto_Open as the name. Then record your
macro. It'll run when you open the workbook - still works even in 2007!

But somehow associating it with the Workbook_Open() event is generally the
standard way of doing things these days.

"Gord Dibben" wrote:

Record the macro then wrap it inside the Workbook_Open

i.e.

Sub Macro1()
'do the steps
End Sub

In Thisworkbook hit Workbook in left-side dialog to get

Private Sub Workbook_Open()

End Sub

Stick Macro1 between the lines or copy the "steps" from Macro1.

Private Sub Workbook_Open()
Macro1
End Sub

Private Sub Workbook_Open()
'do the steps
End Sub

Either one will work, but the second method means you don't have to save
Macro1


Gord Dibben MS Excel MVP


On Wed, 23 May 2007 16:17:00 -0700, Max
wrote:

I see the Workbook Open in VB. Can I do one by recording using
Tools/Macro/Record?



"Don Guillett" wrote:

Look in the ThisWorkbook module for workbook_open or create an
auto_open
macro

--
Don Guillett
SalesAid Software

"Max" wrote in message
...
I want to create a startup or automatic macro in Excel 2003. I have
looked
in Help, VB Help, and on-line KB to no avail.

How do I begin? How do I tell Excel that this is an auto macro, not
just a
regular macro?

Thanks in advance.






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
Automatic Startup for a Macro gspirrison Excel Discussion (Misc queries) 5 January 5th 10 06:07 PM
Startup BillCPA Excel Discussion (Misc queries) 2 May 30th 06 09:19 PM
starting a macro at startup chip_pyp Excel Discussion (Misc queries) 1 March 22nd 06 06:59 PM
Startup macro Zeno Excel Discussion (Misc queries) 1 June 29th 05 01:06 PM
Run a Macro on Startup for Specific Spreadsheet Rod Excel Worksheet Functions 4 March 16th 05 08:52 PM


All times are GMT +1. The time now is 10:18 PM.

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

About Us

"It's about Microsoft Excel"