View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Barry Lennox[_2_] Barry Lennox[_2_] is offline
external usenet poster
 
Posts: 29
Default Macro wont run on cell change

Hi OssieMac
Thanks
I tried K2 on entry sheet idea but that didn't work either
K2 =INDEX($J$4:$O$75,MATCH($P$6,$O$4:$O$75,0),2)
Can you send me code for your first suggestion using cell T2
What formula do I put into T2
Barry
"OssieMac" wrote:

Hi Barry,

Changing the value of Entry!$K$2 will not trigger the Worksheet_Change event
for another worksheet. You would need a worksheet calculate event. However,
to do that you would need to save the value of $A$2 at another out of the way
cell and perform a comparison in the start of the calculate event to see if
it actually changed.

Another way is to place the Worksheet_Change on the Entry sheet using K2 as
the target.

--
Regards,

OssieMac


"Barry Lennox" wrote:

Can anyone tell me why this macro does not run when cell value changes

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$2" Then Call Refresh

End Sub

Formula in "A2" is =Entry!$K$2 ("Entry") is anothe worksheet in same workbook

Barry