How can I open Workbook 1 and have Workbook 2 automatically open and be
hidden? Then, when Workbook 1 is closed, will Workbook 2 close also?
Thank you in advance.
How can I open Workbook 1 and have Workbook 2 automatically open and be
hidden? Then, when Workbook 1 is closed, will Workbook 2 close also?
Thank you in advance.
Paste following code into ThisWorkbook's code:
Private Sub Workbook_Open()
Dim oWB As Workbook
Set oWB = Workbooks.Open(Me.Path & "\Workbook2.xls")
oWB.Windows(1).Visible = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Workbooks("Workbook2.xls").Close False
End Sub
HTH
--
AP
"MBum" <MBum@discussions.microsoft.com> a écrit dans le message de news:
0B6A315E-ADB7-4514-B72E-AF5B4EBDD716@microsoft.com...
> How can I open Workbook 1 and have Workbook 2 automatically open and be
> hidden? Then, when Workbook 1 is closed, will Workbook 2 close also?
>
> Thank you in advance.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks