View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jarek Kujawa[_2_] Jarek Kujawa[_2_] is offline
external usenet poster
 
Posts: 896
Default open second workbook

press ALT+F11
double-click on ThisWorkbook module
you should see two windows to the right 1. (General) and 2.
(Declarations)
click on 1. (General) and select Workbook
in 2. select "Open" from the list of events

the result should be:


Private Sub Workbook_Open()


End Sub


in between those 2 lines paste the following code:

Workbooks.Open "SECONWORKBOOK.XLS"

so the resultant macro should read:

Private Sub Workbook_Open()
Workbooks.Open "C:\Documents and Settings\Swain\Desktop
\SECONWORKBOOK.XLS"
End Sub

adjust "SECONWORKBOOK.XLS" and "C:\Documents and Settings\Swain\Desktop
\" (the file's path) accordingly


On 17 Sty, 08:41, uk
wrote:
how does one open a second workbook automatically