Good Day
Please can I have some help on the following
I have a worksheet where I have dependent drop-down lists. The drop downs in cells F13,G13,H13,I13,J13,K13,L13,M13,N13,O13 are all dependent on what is selected in cell B13 and they work fine. I would like the contents of the cells to clear every time I change the info in bell b13 (which is also a drop-down list)
I have the following code that I want to run every time the contents of cell B13 change
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B13")) Is Nothing Then
Range("F13,G13,H13,I13,J13,K13,L13,M13,N13,O13").ClearContents
End If
End Sub
The problem I am having is that this only works the first time when I open the workbook. after that every time I change cell B13 the data in cells F13,G13,H13,I13,J13,K13,L13,M13,N13,O13 do not clear
I cannot understand why because the same code works fine in other spreadsheets that I have - albeit not the exact same ranges
Thanks in Advance for any help you can offer
Joe
Please can I have some help on the following
I have a worksheet where I have dependent drop-down lists. The drop downs in cells F13,G13,H13,I13,J13,K13,L13,M13,N13,O13 are all dependent on what is selected in cell B13 and they work fine. I would like the contents of the cells to clear every time I change the info in bell b13 (which is also a drop-down list)
I have the following code that I want to run every time the contents of cell B13 change
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B13")) Is Nothing Then
Range("F13,G13,H13,I13,J13,K13,L13,M13,N13,O13").ClearContents
End If
End Sub
The problem I am having is that this only works the first time when I open the workbook. after that every time I change cell B13 the data in cells F13,G13,H13,I13,J13,K13,L13,M13,N13,O13 do not clear
I cannot understand why because the same code works fine in other spreadsheets that I have - albeit not the exact same ranges
Thanks in Advance for any help you can offer
Joe