Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Minimise worksheets

I am producing a workbook (DoorShedule) which has macros to rearrange its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so I
need to minimise all worksheets then maximise/restore those DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could I
use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Minimise worksheets

Why not just activate the DoorSchedule (bring it to the front)

Workbooks("DoorSchedule.xls").Activate


---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Francis Hookham" wrote in message
...
I am producing a workbook (DoorShedule) which has macros to rearrange its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so I
need to minimise all worksheets then maximise/restore those DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could I
use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Minimise worksheets

numbersheets = worksheets.count

If you have multiple workbooks opened then

numbersheets = 0
for each wkbk in workbooks
numbersheets = numbersheets + workbooks(wkbk.name).worksheets.count
next wkbk

"Roger Whitehead" wrote:

Why not just activate the DoorSchedule (bring it to the front)

Workbooks("DoorSchedule.xls").Activate


---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Francis Hookham" wrote in message
...
I am producing a workbook (DoorShedule) which has macros to rearrange its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so I
need to minimise all worksheets then maximise/restore those DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could I
use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Minimise worksheets

The point is I need to minimise ALL sheets and then Restore Down only those
I need and then arrange them in various ways. If sheets from other workbooks
are not minimised ther will take part in the arrangement. On the other hand
I do not want to close any other workbook 'open' at the time.

Unless there is a better way I shall work on Joel's lead.

Many thanks Roger

Francis


"Roger Whitehead" wrote in message
...
Why not just activate the DoorSchedule (bring it to the front)

Workbooks("DoorSchedule.xls").Activate


---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Francis Hookham" wrote in message
...
I am producing a workbook (DoorShedule) which has macros to rearrange its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so I
need to minimise all worksheets then maximise/restore those DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could I
use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Minimise worksheets

Many thanks Joel - I shall work on that - count them and use numbersheets to
minimise them. It was the means of counting I was uncertain of.

Francis



"Joel" wrote in message
...
numbersheets = worksheets.count

If you have multiple workbooks opened then

numbersheets = 0
for each wkbk in workbooks
numbersheets = numbersheets + workbooks(wkbk.name).worksheets.count
next wkbk

"Roger Whitehead" wrote:

Why not just activate the DoorSchedule (bring it to the front)

Workbooks("DoorSchedule.xls").Activate


---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Francis Hookham" wrote in message
...
I am producing a workbook (DoorShedule) which has macros to rearrange
its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so
I
need to minimise all worksheets then maximise/restore those
DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could
I
use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Minimise worksheets

If you set your DoorSchedule as an object, and refer to it's sheets
explicitly (and other WBs and their Sheets for that matter) you can specify
in your code exactly which Books/Sheets to affect.

Regards
Roger

"Francis Hookham" wrote in message
...
The point is I need to minimise ALL sheets and then Restore Down only
those I need and then arrange them in various ways. If sheets from other
workbooks are not minimised ther will take part in the arrangement. On the
other hand I do not want to close any other workbook 'open' at the time.

Unless there is a better way I shall work on Joel's lead.

Many thanks Roger

Francis


"Roger Whitehead" wrote in message
...
Why not just activate the DoorSchedule (bring it to the front)

Workbooks("DoorSchedule.xls").Activate


---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Francis Hookham" wrote in message
...
I am producing a workbook (DoorShedule) which has macros to rearrange its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so I
need to minimise all worksheets then maximise/restore those DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could
I use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Minimise worksheets

If you set your DoorSchedule as an object, and refer to it's sheets
explicitly (and other WBs and their Sheets for that matter) you can specify
in your code exactly which Books/Sheets to affect.

Regards
Roger

"Francis Hookham" wrote in message
...
The point is I need to minimise ALL sheets and then Restore Down only
those I need and then arrange them in various ways. If sheets from other
workbooks are not minimised ther will take part in the arrangement. On the
other hand I do not want to close any other workbook 'open' at the time.

Unless there is a better way I shall work on Joel's lead.

Many thanks Roger

Francis


"Roger Whitehead" wrote in message
...
Why not just activate the DoorSchedule (bring it to the front)

Workbooks("DoorSchedule.xls").Activate


---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)

"Francis Hookham" wrote in message
...
I am producing a workbook (DoorShedule) which has macros to rearrange its
named worksheets.

Other XL workbooks may be open at the same time as the DoorSchedule so I
need to minimise all worksheets then maximise/restore those DoorSchedule
sheets as required.

Can you show me how to count the total number of sheets open then could
I use

ActiveWindow.WindowState = xlMinimized

in a loop to minimise all?



Or is there a better way?



Francis Hookham









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimise unwanted windows Francis Hookham Excel Programming 2 October 3rd 07 04:04 PM
Maximise and Minimise buttons Jason Zischke Excel Programming 6 February 28th 06 12:11 AM
Minimise Excel after several minutes Wayne_Perth_WA Excel Discussion (Misc queries) 1 May 26th 05 08:21 AM
Disabling Minimise/Restore Down buttons Scampa7[_2_] Excel Programming 1 October 25th 03 07:05 PM
Minimise Maximise Problem Gordon Cartwright Excel Programming 3 August 8th 03 04:13 PM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"