Closing a named workbook?
Hi all, I have a generated filesearch list of files, in a master workbook (FM Purchase Order.xls). Is there a macro that i can put in the auto_open bit of the searched files, to say: If there is an workbook open called "FM Purchase Order.xls", close it. Thank you! -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=526037 |
Closing a named workbook?
Sub test()
On Error Resume Next Workbooks("FM Purchase Order.xls").Close On Error GoTo 0 End Sub HTH -- AP "drucey" a écrit dans le message de ... Hi all, I have a generated filesearch list of files, in a master workbook (FM Purchase Order.xls). Is there a macro that i can put in the auto_open bit of the searched files, to say: If there is an workbook open called "FM Purchase Order.xls", close it. Thank you! -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=526037 |
Closing a named workbook?
Artus, you are amazing. -- drucey ------------------------------------------------------------------------ drucey's Profile: http://www.excelforum.com/member.php...o&userid=32553 View this thread: http://www.excelforum.com/showthread...hreadid=526037 |
All times are GMT +1. The time now is 12:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com