![]() |
worksheet_change
I have two drop down lists.
One in A2 and one in A4. The list that supports A4 changes when A2 changes What I want to happen is when A2 changes, A4 is set to blank (forcing the user to make a new selection in A4 from the new list. I've written this simple routine, but it doesn't work. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$2" Then Range("$A$4").Value = "" End If End Sub Nothing happens. I've done a breakpoint and stepped through it. It is being triggered and correctly determines that A2 has changed. But the change to A4 does not happen. I've tried a lot of variations, but nothing seems to allow me to get A4 to change. |
worksheet_change
Are your drop-downs as a result of a ComboBox or a Data Validation rule?
-- Please rate posts so we know when we have answered your questions. Thanks. "makulski" wrote: I have two drop down lists. One in A2 and one in A4. The list that supports A4 changes when A2 changes What I want to happen is when A2 changes, A4 is set to blank (forcing the user to make a new selection in A4 from the new list. I've written this simple routine, but it doesn't work. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$2" Then Range("$A$4").Value = "" End If End Sub Nothing happens. I've done a breakpoint and stepped through it. It is being triggered and correctly determines that A2 has changed. But the change to A4 does not happen. I've tried a lot of variations, but nothing seems to allow me to get A4 to change. |
worksheet_change
They are data validation rules.
"Orion Cochrane" wrote: Are your drop-downs as a result of a ComboBox or a Data Validation rule? |
worksheet_change
1. Make sure the validation rule for A4 allows a blank value.
2. Make sure the code is in the worksheet, not in a module. Tom "makulski" wrote: They are data validation rules. "Orion Cochrane" wrote: Are your drop-downs as a result of a ComboBox or a Data Validation rule? |
worksheet_change
Thanks for the suggestions.
I believe I had both set that way. But, this morning it is working! So, I'll credit you with a win. "TomPl" wrote: 1. Make sure the validation rule for A4 allows a blank value. 2. Make sure the code is in the worksheet, not in a module. Tom |
All times are GMT +1. The time now is 01:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com