djmelanson
New Member
- Joined
- Jun 3, 2015
- Messages
- 17
Hi guys, I have two workbooks named Book1 and Hydro Line Stops. I created a macro that opens the Hydro Line Stops file automatically upon opening Book1. I have copied what I have so far below:
Private Sub Workbook_Open()
Workbooks.Open Filename:="\\bdl0fs05\Departments\Hydro Mechanical\Production Management\OE Open Order Status\Hydro Line Stops.lnk"
ThisWorkbook.Activate
End Sub
This works perfectly fine but I would like to also close the Hydro Line Stops file automatically when I close the Book1 workbook. I have tried:
Workbook("Hydro Line Stops.xlsm").close False
but I'm obviously doing something wrong here. Any help would be appreciated. Thanks.
Private Sub Workbook_Open()
Workbooks.Open Filename:="\\bdl0fs05\Departments\Hydro Mechanical\Production Management\OE Open Order Status\Hydro Line Stops.lnk"
ThisWorkbook.Activate
End Sub
This works perfectly fine but I would like to also close the Hydro Line Stops file automatically when I close the Book1 workbook. I have tried:
Workbook("Hydro Line Stops.xlsm").close False
but I'm obviously doing something wrong here. Any help would be appreciated. Thanks.