View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Francis Hookham Francis Hookham is offline
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