Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 342
Default 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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet_Change [email protected] Excel Programming 3 September 13th 07 06:06 PM
Worksheet_Change Greg Bloom Excel Programming 1 November 5th 03 08:44 PM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"