Originally Posted by
CodeNinja
Mykal66,
Interesting problem... I would solve it by using the built in document properties for last save time in the workbook_open call. I would save the last time the message was recorded in a cell (can be on a hidden sheet etc) and update that every time the message was given, and on open of the workbook, I would save the workbook.
That looks like this:
Of course you will have to change sheet1.cells(1,1) to whatever sheet and cell you want to save it to...
[VBA]
Private Sub Workbook_Open()
Dim savDt As Date
Dim msgDt As Date
savDt = ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
msgDt = Sheet1.Cells(1, 1)
If Year(msgDt) < Year(savDt) Or Month(msgDt) < Month(savDt) Then
MsgBox ("You have not seen this message yet this month")
Sheet1.Cells(1, 1) = Now
End If
ThisWorkbook.Save
End Sub
[/VBA]