PC Review


Reply
Thread Tools Rate Thread

Dynamic "Crosses At"

 
 
KENNY
Guest
Posts: n/a
 
      26th Mar 2004
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
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      26th Mar 2004
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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clusted stacked column chart - "Value (Y) axis crosses betweencategories" greyed out problem GodotIsDead Microsoft Excel Charting 0 30th Jun 2010 01:54 AM
"X-axis crosses at..." nsv Microsoft Excel Charting 2 29th Mar 2006 12:06 AM
Format Axis; Scale Tab; "Value Axis Crosses At" ends with preposit =?Utf-8?B?UGVkYW50?= Microsoft Excel Charting 1 29th Aug 2005 03:50 AM
Dynamic "Max" & "Crosses At" SAMMY Microsoft Excel Charting 6 15th Apr 2004 03:29 PM
Dynamic Query by Form using both "AND" and "OR" operators in criteria selection E.S. Easterly Microsoft Access 0 30th Sep 2003 09:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:17 PM.