ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open Workbook in separate window (https://www.excelbanter.com/excel-programming/338849-open-workbook-separate-window.html)

pdberger

Open Workbook in separate window
 
With help from folks here, I've written a short code to open another workbook
as my primary workbook opens. However, it does so in the existing window.
The other workbook just has reference data, is password-protected and, in
this context, just behaves as a nuisance.

I'd like it to open but otherwise stay lurking in the background somewhere.

I'm using workbook.open, and checked the command but there isn't an option
to tell the 'called' workbook to stay minimized.

Should I essentially treat this step as somewhat of a subroutine? That is,
would an act like placing the cursor in the workbook I'm actually using cause
it to come to the front again?

Bernie Deitrick

Open Workbook in separate window
 
pd,

After the line that opens the workbook, try adding code like this:

Windows(ThisWorkbook.Name).Activate

HTH,
Bernie
MS Excel MVP


"pdberger" wrote in message
...
With help from folks here, I've written a short code to open another workbook
as my primary workbook opens. However, it does so in the existing window.
The other workbook just has reference data, is password-protected and, in
this context, just behaves as a nuisance.

I'd like it to open but otherwise stay lurking in the background somewhere.

I'm using workbook.open, and checked the command but there isn't an option
to tell the 'called' workbook to stay minimized.

Should I essentially treat this step as somewhat of a subroutine? That is,
would an act like placing the cursor in the workbook I'm actually using cause
it to come to the front again?




William Benson[_2_]

Open Workbook in separate window
 
How would you like to:

When you open primary, open the other also
-- make it hidden
-- make a Right-Click menu item to unhide it
-- on either workbook allow a right-click menu to re-hide it
-- when it closes, not prompt to be saved (so it won't be bugging the
user)?

If so, send me the
paths to each file and their name
which one should be primary and which hidden

and I will send the events and the code to handle them.

Bill

"pdberger" wrote in message
...
With help from folks here, I've written a short code to open another
workbook
as my primary workbook opens. However, it does so in the existing window.
The other workbook just has reference data, is password-protected and, in
this context, just behaves as a nuisance.

I'd like it to open but otherwise stay lurking in the background
somewhere.

I'm using workbook.open, and checked the command but there isn't an option
to tell the 'called' workbook to stay minimized.

Should I essentially treat this step as somewhat of a subroutine? That
is,
would an act like placing the cursor in the workbook I'm actually using
cause
it to come to the front again?





All times are GMT +1. The time now is 12:02 PM.

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