sheet event does not recognise Tartget

  • Thread starter Thread starter helmekki
  • Start date Start date
H

helmekki

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 <>
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 Su
-------------------


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

yours
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top