View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default sheet update date

use the code page behind ThisWorkbook, and add this code:

Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim rw As Long
Dim indexlist As Range
If Sh.Name = "Master Sheet" Then Exit Sub
Set indexlist = Worksheets("Master Sheet").Range("A1:A100")
On Error Resume Next
rw = Application.WorksheetFunction.Match(Sh.Name, indexlist, False)
If Err.Number < 0 Then
Err.Clear
Else
Worksheets("Master Sheet").Range("A1").Offset(rw - 1, 1) = Now
End If
End Sub



"Ranjith Kurian" wrote in message
...
I have a excel workbook with many sheets and in my master sheet i hv all
the
sheet names in one column, i would like to have macro code ,so that if
anybody type any comments on any sheets the date need to be appeared on my
master sheet next to sheet name column.

Example
Master Sheet:
sheetname
sheet1
sheet2
if somebody open the excel file and update the comments on sheet2 and the
file is saved and closed.

when i look into my master file, the comments updated date should appear
next to column of sheet names
Master Sheet:
sheetname comment Date
sheet1
sheet2 May 27th 2009 11:15pm