Open the Workbook.
Press "Alt + F11"
Press "Ctrl + R"
There will be a window labeled Project - VBAProject
Inside that window there will be listed any open workbooks.
Look under the workbook you're working with to find "ThisWorkbook" an
double-click it.
Another window will appear with "ThisWorkbook (CODE)" in the titl
bar.
There will be two drop down menus near the top of this window.
Drop both of these down and select "Workbook" from the one on the lef
and "Open" from the one on the right.
The body of the window should read:
Private Sub Workbook_Open()
End Sub
Place the code there.
- Piku
--
Message posted from
http://www.ExcelForum.com