I need an explanation on the time limit in this code.
The way I read it (probably wrong) I interpret it to be like this.
If the date is 14 days past starting date (19-06-2006) then show the promt.
Question : Why then today when I run the code do I not get to see the prompt ?
Many thanks
[vba]Private Sub Workbook_Open()
Dim incRange As Range
Dim StartDate As Date
Set incRange = Range("Increment")
StartDate = "19/06/06" 'Date delivered to customer
Sheets("hidden").Visible = xlVeryHidden
incRange = incRange + 1
Me.Save
If incRange > 10 Or Date - StartDate > 14 Then
Application.DisplayAlerts = False
MsgBox "over the use limit, contact owner"
Me.Close
End If
End Sub[/vba]