Unless you have
Option Compare Text
at the top of the module, this line:
If Target.Address(0, 0) = "b5" Then
will never have the True portion followed.
Try:
If Target.Address(0, 0) = "B5" Then
Personally, I like this test better:
if target.cells.count > 1 then exit sub
if intersect(target, me.range("b5")) is nothing then exit sub
I find it easier to change (to include more cells, for example).
(I didn't look any further.)
> Have the following in a sheet code that i would like to activate when
> the enter key is pressed in B5.
[quoted text clipped - 31 lines]
> End If
> End Sub

Signature
Dave Peterson
K1KKKA - 18 Jan 2007 22:44 GMT
Dave
Thanks
> if target.cells.count > 1 then exit sub
> if intersect(target, me.range("B5")) is nothing then exit sub
Worked a treat.
Never even thought about text case, appreciate your assistance and
comments
Steve
> Unless you have
> Option Compare Text
[quoted text clipped - 49 lines]
> > End If
> > End Sub
Erich Neuwirth - 19 Jan 2007 19:39 GMT
Personally,
I find coding like
If (Target.Row = 5) and (Target.Column = 2) Then
less error prone
> Unless you have
> Option Compare Text
[quoted text clipped - 6 lines]
>
> Personally, I like this test better: