Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
minimize just opened workbook window
In an Open event subroutine for "workbook1", I open a second workbook
"workbook2" that is defined by label "book2" in a "workbook1" worksheet with the following statements: Dim wkbook2 as object Set wkbook2 = Range("book2") Workbook.Open (wkbook2) Question: How do I minimize (xlMinimize) the window for the just opened "workbook2" using the label "book2" defined in "workbook1"? Workbooks(wkbook2).ActiveWindow.WindowState = xlMinimized Above statement does not work. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
minimize just opened workbook window
A couple of things... wkbook2 is pointing at a range and not at the workbook
as you might expect it is. Secondly when you open a workbook it is opened in the active window so to hide it you just need ActiveWindow.WindowState = xlMinimized. Give this a try... Dim wkbook2 as Workbook Workbook.Open (Range("book2").Value) Set wkbook2 = ActiveWorkbook ActiveWindow.WindowState = xlMinimized -- HTH... Jim Thomlinson "JohnZ" wrote: In an Open event subroutine for "workbook1", I open a second workbook "workbook2" that is defined by label "book2" in a "workbook1" worksheet with the following statements: Dim wkbook2 as object Set wkbook2 = Range("book2") Workbook.Open (wkbook2) Question: How do I minimize (xlMinimize) the window for the just opened "workbook2" using the label "book2" defined in "workbook1"? Workbooks(wkbook2).ActiveWindow.WindowState = xlMinimized Above statement does not work. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
show minimize window selection for Excel | Excel Discussion (Misc queries) | |||
Excel 03 - Send Attachment (can't minimize Outlook window) | Excel Discussion (Misc queries) | |||
how do i minimize/maximize a workbook from vba? I want to minimize it durring processing to speed things up a bit | Excel Worksheet Functions | |||
How to see if the opened workbook is opened by another user ? | Excel Programming | |||
window minimize | Excel Programming |