View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Steph Steph is offline
external usenet poster
 
Posts: 110
Default Record Name of Workbook on Close

Thank you - this helps very much.

--
Steph


"Gary''s Student" wrote:

Lets assume that whenever you are working you have a workbook called log.xls
open. Put the following workbook event code in all your other workbooks:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set sl = Workbooks("log.xls").Sheets("logsheet")
s = ThisWorkbook.Name
n = sl.Cells(Rows.Count, 1).End(xlUp).Row + 1
sl.Cells(n, 1) = s
End Sub

Before closing a workbook, its name will be recorded in the log workbook.
--
Gary''s Student - gsnu200780


"Steph" wrote:

I am trying to get at a procedure that extends the recent files list for
Excel 2003. Is there a way to record the names of all workbooks onto a
separate Excel file (like maybe Personal.xls) when they are closed? Idealy,
I want to track the name of any workbook I close because the recent files
list only allows a history of up to nine - I have a lot of workbooks that I
open and close and am forgetting where they are on the network.

--
Steph