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
 
Top