View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Close all other open Workbooks

Try something like this

Dim WB as Workbook

For each WB in Application.Workbooks
if wb.name < thisworkbook.name then
WB.Close 'You may want to save or do something else here
end if
next WB
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"CLR" wrote:

Hi all..........

Need code if you please to close all other open workbooks except the one I'm
running the macro in. I do not know what their names are.

TIA
Vaya con Dios,
Chuck, CABGx3