open workbook b when workbook a opened

G

Gord Dibben

Stick this code into Thisworkbook module of workbook a

Private Sub Workbook_Open()
Workbooks.Open Filename:= "C:\your path to\b.xls"
End Sub


Gord Dibben MS Excel MVP
 
S

swain.s

hello i have tried this & it does not work
the name of workbook (b) is data & workbook is (ts)
 
G

Gord Dibben

Private Sub Workbook_Open()
Workbooks.Open Filename:= "C:\your path to\data.xls"
End Sub

Entered in Thisworkbook module of workbook ts


Gord
 
S

swain.s

many thanks

Gord Dibben said:
Private Sub Workbook_Open()
Workbooks.Open Filename:= "C:\your path to\data.xls"
End Sub

Entered in Thisworkbook module of workbook ts


Gord
 
G

Gord Dibben

If you are still around, now that I have had my afternoon nap, I could
suggest an alternate solution without code.

Open both books and File>Save Workspace as yourname.xlw

They will now open together when you select the yourname.xlw file


Gord
 

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