ndendrinos
11-12-2006, 07:08 AM
This code was offered by mdmackillop in another posting .
I've been trying to create the corresponding worbook to no avail.
Can anyone explain the configuration of the workbook in details ...
Thank you
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
I've been trying to create the corresponding worbook to no avail.
Can anyone explain the configuration of the workbook in details ...
Thank you
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