View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
[email protected] uk swain.s@blueyonder.co uk is offline
external usenet poster
 
Posts: 64
Default i want to open a second workbook automatically when i open the

'run-time error 1004' comes up

"Jacob Skaria" wrote:

--You can open multiple workbooks and save as workspace .xlw. Opening this
workspace would open all linked workbooks.

--VBA method...Set the security level to low/medium in
(Tools|Macro|Security). Open master workbook. Press Alt+F11 to launch VBE
(Visual Basic Editor). From the left treeview search for the workbook name
and click on + to expand it. Within that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the below code to the right code pane.
Private Sub Workbook_Open()
Workbooks.Open Me.Path & "\data.xls"
End Sub

SaveClose and re-open master file..which should open the data.xls from the
same folder

If this post helps click Yes
---------------
Jacob Skaria


uk" wrote:

both work books are in C:\
the master workbook name is test
the slave workbook name is data