open workbooks when opening an excel file

J

jprogrammer

I have 2 workbooks- workbook A contains a master job list and workbook
contains employees time allocated on a job. The master job lis
(workbook A) changes often so I have created a link between the
workbooks. I would like to create a macro that will open workbook
when I open workbook B. I assume I would put this in the open workboo
event
 
G

Guest

Private Sub Workbook_Open()
workbooks.Open "C:\MyFolder\Workbook B.xls"
End Sub

go into the VBE (alt + F11), then in the project explorer on the left,
select your workbook and double click on the ThisWorkbook entry under your
project. this should open the thisworkbook module. At the top of the
module, in the left dropdown select Workbook and in the right down select
Open.

Modify at the second line above (adjusted for your specifics).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top