Put the code in the Workbook_Open routine of the Workbook module.
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article , wyndman
says...
I'm trying to have Excel run a macro I have written when a spreadsheet
is opend. I have a windows script that will open Excel for me, and the
spreadsheet I need, but so far I've had little luck getting the macro
to run. I've coded it into the actual sheet to run when it starts, but
it can never find the macro. 
---
Message posted from http://www.ExcelForum.com/