LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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


 
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
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Macro automatic update miteeka Excel Discussion (Misc queries) 2 April 24th 07 04:32 PM
capture DDE update value in VBA macro chs245 Excel Discussion (Misc queries) 1 April 13th 05 03:31 PM
dde link update in vba macro Knut Excel Programming 1 January 20th 04 12:55 AM
Macro update Rhonda[_2_] Excel Programming 1 September 12th 03 01:11 AM


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

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

About Us

"It's about Microsoft Excel"