Kenny -
Capitalize your address references: use "$A$1", not "$a$1". The rest of
the statement works fine.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______
KENNY wrote:
> Trying to allow a scatter graph to have both axes flex to
> a cell reference. Below is my non-working code.
>
> Help?! TIA!
>
>
> Option Explicit
> Private Sub Worksheet_Change(ByVal Target As Excel.Range)
> Select Case Target.Address
>
> Case "$a$1"
> ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
> _
> .CrossesAt = Target.Value
>
> Case "$b$1"
> ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue) _
> .CrossesAt = Target.Value
>
> Case Else
> End Select
> End Sub