View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default sheet event does not recognise Tartget

I don't understand what you are trying to do but

if target.address < "$A$1" then exit sub
'more code

will not do anything unless you are in cell a1

--
Don Guillett
SalesAid Software

"helmekki" wrote in message
...

Hi :(
A1 B1 C1
0 20 20

A1:=sum(B1-C1)

i want the code to recognise A1 as the Target, so if the Target < 0
then procced the rest


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)

Dim T As Range
Set T = Range("A5:A1000")
If Application.Intersect(Target, T) Is Nothing Then
If Target.Value < 0 Then
Beep
Msg = MsgBox(" Imbalanced operation with " & Target.Value,

vbCritical, "The Balance!")
End If
End If

End Sub
--------------------


could someone pls help........any help is appreciated

yours
h


--
helmekki


------------------------------------------------------------------------
helmekki's Profile:

http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=269819