date calculation


Posted by Neutron on August 02, 2001 1:12 AM

I have failed to find a way to automatically copy numerical data from one cell to another on a specific day of every month. Any advice gratefully received.
Many thanks



Posted by Cory on August 02, 2001 9:57 AM

I don't think this can be done unless the workbook's open, so I wrote this code to run every time it gets opened:

Private Sub Workbook_Open()
If Date = "8/1/01" Then
Application.Wait (Now + TimeValue("0:00:02"))
Range("a1").Select
Selection.Copy
Range("b1").Select
ActiveSheet.Paste
Range("a1").Select
Application.CutCopyMode = False
End If
End Sub

This specifies the code to run when the book is opened but only if the date is equal to the one in the code. You could set it up with some elseifs to include next months date, the one after that, and so on and so forth.

I doubt this is what you're looking for, but it should get you going in the right direction.

Cory