Hi,
I have a cell (J6) with a drop down list (just two options "Day" and "Night"). If "Night" is chosen in the drop down, then I want cells S4:S5 to clear contents. I did put this code into Sheet1 VBA but nothing happens when I choose Night from the drop down. It must operate in the background without a macro button or anything like that. Any help would be appreciated.
I have a cell (J6) with a drop down list (just two options "Day" and "Night"). If "Night" is chosen in the drop down, then I want cells S4:S5 to clear contents. I did put this code into Sheet1 VBA but nothing happens when I choose Night from the drop down. It must operate in the background without a macro button or anything like that. Any help would be appreciated.
VBA Code:
Sub ClearContentsDropDown()
If ThisWorkbook.Worksheets("SHEET1").Range("J6") = "Night" Then
ActiveSheet.Range("S4:S5").ClearContents
End If
End Sub