View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Macro wont run on cell change

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