View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
James[_22_] James[_22_] is offline
external usenet poster
 
Posts: 2
Default referencing another sheet

Hello NG,
can someone please help me with problem in regards to referencing another
worksheet?
I have a worksheet called "log" which keeps track of the date the last time
the workbook was modified.
I also have many worksheets for each month of the years, (i.e. jan2004,
feb2004, mar2004...).
What I would like to do is display a message showing the date the last time
the workbook is modified.
I can get everything to work but I always end up on the log sheet, how can I
sat on the current month's page and reference the Log sheet?
Any suggestions would be greatly appreciated.
Thanks
James

This works============================================= =======

Sub LastModified()

Dim datLastModified As Date
Dim datToday As Date
Dim intLastCell As Integer

datToday = Date
Application.ScreenUpdating = False

Worksheets("Log").Select
Range("=Log!A1").Select
ActiveCell.SpecialCells(xlLastCell).Select
datLastModified = ActiveCell.Value
ActiveCell.Offset(1, 0) = datToday

Application.ScreenUpdating = True

MsgBox "Last modified on: " & datLastModified, vbOKOnly, "Last Modified"

End Sub