ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbooks.Open closes other workbooks (https://www.excelbanter.com/excel-programming/274956-workbooks-open-closes-other-workbooks.html)

S. Daum

Workbooks.Open closes other workbooks
 
When I execute the Workbooks.Open method - an existing workbook in the Excel
window vanishes. Does anyone know how to prevent this?

Steve



Rocky McKinley

Workbooks.Open closes other workbooks
 
Hi Steve,

I'm assuming that you mean the existing workbook isn't in the foreground and
the new workbook that is opened comes to the front, in this case try...

ThisWorkbook.Activate

after you use the open method this should reactivate the workbook the code
was called from.

Regards, Rocky McKinley


"S. Daum" wrote in message
...
When I execute the Workbooks.Open method - an existing workbook in the

Excel
window vanishes. Does anyone know how to prevent this?

Steve






All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com