Thread: Autorun
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
EmilH EmilH is offline
external usenet poster
 
Posts: 5
Default Autorun

Thanks a lot!

"Norman Jones" wrote in message
...
Hi E,

Try something like:

'=============
Private Sub Workbook_Open()
Call MyMacro
End Sub
'<<=============

This is workbook event code and should be pasted into the workbook's
ThisWorkbook module *not* a standard module or a sheet module:

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if your workbook is maximised)
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.


---
Regards,
Norman



"EmilH" wrote in message
...
Hi.

How can I make my code run as soon as the .xls document is opened?

Thanks in advance.
EmilH.