Thread: Startup Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
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.