View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default executing macros upon opening xls files

Hi Dr Chuck,

Try :

'=============
Private Sub Workbook_Open()
Call X
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



"dr chuck" wrote in message
...
I have a macro named "x" that i want to execute automatically when file
"panel.xls" is opened. Is that possible? any suggestions on how to do it?

--
dr chuck