C
CLR
Hi All..........
I have two workbooks open, the second having been opened automatically when
the first one opened. Workbook1 is where I do my business and Workbook2 is
for reference and calculations. When I want to close Workbook1, I would
like to first have Workbook2 close by "Before close" macro..........I have
attempted it as below. the two middle lines were recorded and work fine
when triggered manually, but not in this instance..............could someone
please show me where I'm going wrong? The macro hangs on the line starting
with "Windows".
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Windows("_ACpowerCalculator_022504_RevA10Master.xls").Activate
ActiveWorkbook.Close
End Sub
TIA
Vaya con Dios,
Chuck, CABGx3
I have two workbooks open, the second having been opened automatically when
the first one opened. Workbook1 is where I do my business and Workbook2 is
for reference and calculations. When I want to close Workbook1, I would
like to first have Workbook2 close by "Before close" macro..........I have
attempted it as below. the two middle lines were recorded and work fine
when triggered manually, but not in this instance..............could someone
please show me where I'm going wrong? The macro hangs on the line starting
with "Windows".
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Windows("_ACpowerCalculator_022504_RevA10Master.xls").Activate
ActiveWorkbook.Close
End Sub
TIA
Vaya con Dios,
Chuck, CABGx3