Thread: Scaling Graphs
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Steen Steen is offline
external usenet poster
 
Posts: 104
Default Scaling Graphs

Hi Jon

Thanks for coming back on the issue - I'm quite busy at the moment but I
will try to make an explanation during the weekend.

/Steen

"Jon Peltier" wrote:

How are these other features added to the chart?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Steen" wrote in message
...
Hi Jon

That did the job - shame on me for not seeing this my self :-)

All how this just lead to the next problem - the change of scale didn't
work
like I supposed. The timescale is changed allright, but some of the
information (vertical deadlines and budget lines) get messed up, when
changing view :-(

It's a bit difficult to explain but thanks for the help so far.

/steen

"Jon Peltier" wrote:

You didn't hint at where the code stops, or what error messages you saw.

One thing I noticed: Change this (and related statements):

StartDate = Range(i2)

to

StartDate = Range("i2").Value

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Steen" wrote in message
...
Hi

Can anyone help me gette the below code working - novice VB programmer
:-)

I want the scale of Graph 1 and 2 to change each time the value in row
2
and
col 4 changes. Min and Max scacle Ã*s set in i2 and i4 when changing the
above
value.

Any help would be appriciated.

'Private Sub Worksheet_Change(ByVal Target As Range)
'Dim StartDate
'Dim StopDate
'
' If Target.Row = 2 And Target.Column = 4 Then
' StartDate = Range(i2)
' StopDate = Range(i4)
'
' With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
' .MinimumScale = StartDate - 7
' .MaximumScale = StopDate +7
' End With
'
' ' With ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlCategory)
' ' .MinimumScale = StartDate - 7
' ' .MaximumScale = StopDate + 7
' 'End With
'
' End If
'End Sub