Worksheet Change question
as stated in the previous thread, copying the code from there worked
flawlessly for me.
Perhaps your code disabled events, then crashed and the events are not even
firing.
If so, run this from a general module
Sub ResetEvents()
Application.Enableevents = True
End Sub
--
Regards,
Tom Ogilvy
"Barb Reinhardt" wrote:
This is a continuation of another thread. That was getting a bit unweildy.
I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
Application.EnableEvents = False
If Target.Value < "" Then
Target.Offset(0, 1).Resize(1, 4).FormulaR1C1 = _
"=VLOOKUP(RC1,DBExtract,MATCH(R1C,DBExtract!R1,0), FALSE)"
Target.Offset(0, 1).Resize(1, 4).Copy
Target.Offset(0, 1).Resize(1, 4).PasteSpecial xlValues
Else
Target.Offset(0, 1).Resize(1, 4).Value = ""
End If
Application.EnableEvents = True
End If
End Sub
I'm not seeing anything being displayed in the adjacent cells. What have I
done wrong. It worked at one time (before I added the IF TARGET.value =
""), but now I can't even get it to work at all.
Thanks,
Barb Reinhardt
|