View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
GarethG[_8_] GarethG[_8_] is offline
external usenet poster
 
Posts: 1
Default Detect when Active Cell Changes

I use the following code to update a chart in my worksheet:

Sub ChartRow()
Dim mySeries As Series
Dim myItem As PivotItem
Set mySeries =
ActiveSheet.ChartObjects("RowChart").Chart.SeriesC ollection(1)
Set myItem = ActiveCell.EntireRow.Cells(1).PivotItem
mySeries.Values = myItem.DataRange
mySeries.Name = myItem.LabelRange
End Sub

What I need is a way of detecting automatically whenever the active
cell has changed, then to execute this code.
The active cell may change by someone scrolling through records using
the cursor keys or by clicking directly with the mouse.

Anyone?
Gareth G



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/