From: Xman on
OK, I have a spreadsheet-packing list thats gets populated from 3 differrent
list's depending on what kind of slip I'm preparing via a drop down menu. Is
there a way clear the exsisting information on the sheet when I make a
selection in the dropdown menu to select another slip. Cureently, I have to
manually delete everything. Thanks in advance.
--
JARoman
From: teylyn on

Hello JARoman,

the following code needs to go into the Sheet module




VBA Code:
--------------------



Private Sub Worksheet_Change(ByVal Target As Range)
If (Target.Row >= 20 And Target.Row <= 33 And Target.Column = 3) Then
Worksheets("Sheet1").Range("E" & Target.Row).ClearContents
End If
End Sub

--------------------




The macro monitors cells column C (column # = 3), rows 20 to 33. These
cells have data validation with dropdown lists. If one of these cells is
changed, the value in column E of the same row is cleared.

Adjust references to suit your needs.

cheers, teylyn



X
m
a
n
;
6
9
4
9
9
9

W
r
o
t
e
:


>
OK, I have a spreadsheet-packing list thats gets populated from 3
differrent
> list's depending on what kind of slip I'm preparing via a drop down
menu. Is
> there a way clear the exsisting information on the sheet when I make a
> selection in the dropdown menu to select another slip. Cureently, I
have to
> manually delete everything. Thanks in advance.
> --
> JARoman


--
teylyn

Teylyn -- 'teylyn.posterous.com' (http://teylyn.posterous.com)
------------------------------------------------------------------------
teylyn's Profile: 983
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=194366

http://www.thecodecage.com/forumz