Workbooks.Open closes other workbooks

S

S. Daum

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

Steve
 
R

Rocky McKinley

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top