Good idea
For the workbook close event
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Range("A100")
.Value = Date
.NumberFormat = "mm/dd/yy"
End With
End Sub
For the workbook open event
Private Sub Workbook_Open()
Dim lastdate As Date
Dim todaysdate As Date
Dim thisday As Integer
Dim lastday As Integer
Dim noofdays As Integer
lastdate = Range("A100")
todaysdate = Date
thisday = Day(todaysdate)
lastday = Day(lastdate)
noofdays = todaysdate - lastdate
If noofdays > 0 Then
Dim i As Long
For i = 1 To noofdays * 2
autoincrement
Next
Else
End If
End Sub
If you see anything wrong here let me know but it seems to work okay. I have it running twice for each day hence the *2 bit
Bookmarks