Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function ProjDate() As Date
- Dim d1 As Date, d2 As Date, y As Long
- Dim dd As Date, d As Long, m As Long
- d = Day(Date)
- m = Month(Date)
- y = Year(Date)
- d1 = DateSerial(y, m + 18, d + 1)
- d2 = DateSerial(y, m + 24, d - 1)
- For dd = d1 To d2
- d = Day(dd)
- m = Month(dd)
- If (m = 3 And d = 31) Or (m = 9 And d = 30) Then
- ProjDate = dd
- Exit Function
- End If
- Next dd
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement