Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
They are data validation rules.
"Orion Cochrane" wrote: Are your drop-downs as a result of a ComboBox or a Data Validation rule? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet_Change | Excel Programming | |||
Worksheet_Change | Excel Programming | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming |