Try this
Private Sub Workbook_Open()
Dim dte As Date
Dim nMonth As Long
On Error Resume Next
dte = Evaluate(ThisWorkbook.Names("date_stored").RefersT o)
On Error GoTo 0
If dte = 0 Or Month(dte) < Month(Date) Then
Worksheets("Sheet1").Range("A1").Value = _
Worksheets("Sheet1").Range("A1").Value + 8
ThisWorkbook.Names.Add Name:="date_stored", RefersTo:=Date
ThisWorkbook.Names("date_stored").Visible = False
End If
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"SoupNazi" wrote in message
...
I need to add "8" to the total amount in a cell automatically on the 1st of
every month. I understand I can use the OnTime function for this if excel
is
running at the time that I set. If Excel is not running at that time, can
I
set it up to enter that digit the first time I open Excel after the 1st of
the month? I am a beginner at VB, so I really need to be walked through
this.
Thanks a lot.