Sheet change event and list validation question

G

Guest

The following is my code. The Target cell is a list validation. When I type
in the word hide in cell(any row, column 6), the cell in column 7 of the same
row interior pattern changed. But when i use the list validation to change
the value of the cell, the cell interior pattern did not change. I put a
breakpoint to see if the code ran and it did but line 4 of the code did not
do anything.

1 Private Sub Worksheet_Change(ByVal Target As Range)
2 If Target.Column = 6 Then
3 If Ucase$(Trim$(Target.Text)) = "HIDE" Then
4 Cells(Target.Row, 7).Interior.Pattern = xlDown
5 End If
6 End If
7 End Sub
 
T

Tom Ogilvy

If you are using Excel 97, the change event is not fired when a selection is
made from a Data Validation dropdown list that uses a range to populate the
list. I would expect this to work in xl2000 or later.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top