Thread: closeall
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dumbass Dumbass is offline
external usenet poster
 
Posts: 5
Default closeall

i have the following simple program to save all programs
(the first one). i now want the program to close all
sheets. i realize that there is the 'application.quit'
function, but i dont want to close EXCEL. the problem
with the second program below is that the first sheet is
the one with the program, once it closes the prgram
obviously stops. im sure there are many ways of doing
this...

For Each w In Application.Workbooks: w.Save
Next w

For Each w In Application.Workbooks: w.Close
Next w