Hello Everyone,
I have a validation drop menu (data / validation / settings / list) that I want to disable when one date is greater than another date. So for example today is 5th November but I want the drop menu to disable when the date is 6th November. Cell C1 contains a start date (can be any date at all) and cell D1 contains today's date
.
The source for the contents of the drop menu is A1:A5 and the actual drop menu is in cell B1. The drop menu contains just numbers from 1-5 (including both 1 & 5). Whenever one of these numbers is selected from the drop menu a macro is called using the following code:
Each number (1-5) calls a macro that just hides / un-hides the numbers of rows that are visible on the sheet.
Is there any way to perhaps add a couple of lines into the above code or an easier way to disable this as soon as the day expires? All I want to do is to prevent the drop meun from being usable any what possible. I tried using if statements but to no avail!
Thank you very much for any help
Margate
I have a validation drop menu (data / validation / settings / list) that I want to disable when one date is greater than another date. So for example today is 5th November but I want the drop menu to disable when the date is 6th November. Cell C1 contains a start date (can be any date at all) and cell D1 contains today's date
Code:
=TODAY()
The source for the contents of the drop menu is A1:A5 and the actual drop menu is in cell B1. The drop menu contains just numbers from 1-5 (including both 1 & 5). Whenever one of these numbers is selected from the drop menu a macro is called using the following code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("C6")) Is Nothing Then
Select Case Target.Value
Case 1
Call DayOne
Case 2
Call DayTwo
Case 3
Call DayThree
Case 4
Call DayFour
Case 5
Call DayFive
End Select
End If
Each number (1-5) calls a macro that just hides / un-hides the numbers of rows that are visible on the sheet.
Is there any way to perhaps add a couple of lines into the above code or an easier way to disable this as soon as the day expires? All I want to do is to prevent the drop meun from being usable any what possible. I tried using if statements but to no avail!
Thank you very much for any help
Margate