Automatically closing slave workbook when main workbook is closed...

P

Potsy

Hi

Have two workbooks - lets call them workbook1 and workbook2 for ease.

Workbook 1 is the main document, however, some of data is drawn from
Workbook 2 which is currently mininmized by following code in VBA
Workbook1:

Private Sub Workbook_Open()
Workbooks.Open "Workbook2.xls"
ActiveWindow.WindowState = xlMinimized
End Sub

Ideally I would like Workbook2 opened and hidden so that user does not
even know it is running and then shut down automatically when
Worokbook1 is closed.

PS - when Workbook1 is saved it will be renamed, however Workbook2
title will stay static.

thanks in advance.
 

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