View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
job job is offline
external usenet poster
 
Posts: 1
Default Automatically run a macro when opening an Excel file

you simply have to implement the function Open of your
workbook, and call your macro as following

Private Sub Workbook_Open()
Call yourMacro

End Sub


-----Original Message-----
Hi everyone!

I would like to know how could I run a macro

automatically
when a user opens an Excel file. That is, when someone
doubleclick the file on the desktop (for example), the
file opens and runs a specified macro.

Thanks in advance!

Raphael


.