leighmills33
Board Regular
- Joined
- Mar 28, 2008
- Messages
- 56
Hi,
I am having an issue with a worksheet change event, I have three drop down menus at F30,H30 and J30. When I change the drop down for F30 I want the values F21,F25 and F28 to change, when I change the drop down for H30 I want H25 to change and same for J30 with values J21,J23,J26 and J29 changing.
The problem I am getting is only my F value cells are changing when I change, F30, H30 and J30.
I need it so that when I can also change the value of "0mm".
I have attached my code, I also have an example if any one would like me to send it to them.
Thanks
I am having an issue with a worksheet change event, I have three drop down menus at F30,H30 and J30. When I change the drop down for F30 I want the values F21,F25 and F28 to change, when I change the drop down for H30 I want H25 to change and same for J30 with values J21,J23,J26 and J29 changing.
The problem I am getting is only my F value cells are changing when I change, F30, H30 and J30.
I need it so that when I can also change the value of "0mm".
I have attached my code, I also have an example if any one would like me to send it to them.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target <> Range("F30") Then Exit Sub
If Range("F30").Value = "AS ABOVE" Then
Range("F21").Value = "0mm"
Range("F25").Value = "0mm"
Range("F28").Value = "0mm"
End If
If Range("F30").Value = "THREE EQUAL" Then
Range("F21").Value = ""
Range("F25").Value = ""
Range("F28").Value = ""
End If
If Target <> Range("H30") Then Exit Sub
If Range("H30").Value = "AS ABOVE" Then
Range("H25").Value = "0mm"
End If
If Range("H30").Value = "LETTER BOX" Then
Range("H25").Value = ""
End If
If Target <> Range("J30") Then Exit Sub
If Range("J30").Value = "AS ABOVE" Then
Range("J21").Value = "0mm"
Range("J23").Value = "0mm"
Range("J26").Value = "0mm"
Range("J29").Value = "0mm"
End If
If Range("J30").Value = "FOUR EQUAL" Then
Range("J21").Value = ""
Range("J23").Value = ""
Range("J26").Value = ""
Range("J29").Value = ""
End If
End Sub
Thanks