Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Shane for the explanation. It is responses like yours which make
this not only a discussion group but also a learning group. Thanks again. John "ShaneDevenshire" wrote: Hi John, The reason JL says this is the correct way is because it is the more general solution. Consider what you would need to write if the range where users could enter data which triggered your macro was A1:A1000, using the first method you would need to do 1000 IF's, so hard! In JL's case you would change the Range("L36") to read Range("A1:A1000"), so simple! In both cases you can use the sortcut notation [L36] or [A1:A1000] in which case there is no need for the quotes or the Range(). It's faster to enter, but the auto complete feature doesn't work with it and it may not be as flexible in some situations. -- Thanks, Shane Devenshire "JLGWhiz" wrote: This is the correct way to do it. Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("L36"), Target) Is Nothing Then If Target < "" Then Range("E40:E43").ClearContents End If End If End Sub "JohnL" wrote: I am attempting to write code that does the following: Every time the User inputs data in cell L36 Then cells E40 thru E43 are cleared. Thanks John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
apply cell change event to single column - WorksheetChange Event | Excel Programming | |||
How do I change a Worksheet_change event to a beforesave event? | Excel Programming | |||
MsgBox in Enter event causes combobox not to run Change event | Excel Programming | |||
Change event and calculate event | Excel Programming | |||
change event/after update event?? | Excel Programming |