Macro update
I would like the following macro to shut down all open files including 1
hidden file and the shut down the Excel program. I have used this macro for
many years in Excel 5. I am now upgrading to Excel 2002 where it doesn't
work. Do you have any suggestions as to what the problem could be?
Dim Index As Integer, Number As Integer, FinalNumber As Integer
'Index
is a loop counter
Number = Application.Workbooks.Count 'The Number of open Workbooks
FinalNumber = Number - 1 'The 1 refers to the
hidden file
For Index = 1 To FinalNumber 'Place the Workbook names
in an array
ActiveWorkbook.Close saveChanges:=True
Next Index
Application.Quit
Thanks,
Roger
|