PC Review


Reply
Thread Tools Rate Thread

How do I change a Chart's axis scale from visual basic?

 
 
=?Utf-8?B?amZpb3JpbGxv?=
Guest
Posts: n/a
 
      21st Jun 2006
How do I change a Chart's (that is on a worksheet) x-axis scale from visual
basic?

The following only works when the chart has its own sheet/tab.
With Charts("Chart1").Axes(xlCategory)
.MinimumScale = 740.25
.MaximumScale = 746.25
End With

If it is located within a worksheet how do you reference it?
 
Reply With Quote
 
 
 
 
Andy Pope
Guest
Posts: n/a
 
      21st Jun 2006
Hi,

Some more like this for chartobject,

With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
.MinimumScale = 740.25
.MaximumScale = 746.25
End With

Cheers
Andy

jfiorillo wrote:
> How do I change a Chart's (that is on a worksheet) x-axis scale from visual
> basic?
>
> The following only works when the chart has its own sheet/tab.
> With Charts("Chart1").Axes(xlCategory)
> .MinimumScale = 740.25
> .MaximumScale = 746.25
> End With
>
> If it is located within a worksheet how do you reference it?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
 
Reply With Quote
 
=?Utf-8?B?amZpb3JpbGxv?=
Guest
Posts: n/a
 
      21st Jun 2006
Thanks a bunch.
Excellent.
John

"Andy Pope" wrote:

> Hi,
>
> Some more like this for chartobject,
>
> With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
> .MinimumScale = 740.25
> .MaximumScale = 746.25
> End With
>
> Cheers
> Andy
>
> jfiorillo wrote:
> > How do I change a Chart's (that is on a worksheet) x-axis scale from visual
> > basic?
> >
> > The following only works when the chart has its own sheet/tab.
> > With Charts("Chart1").Axes(xlCategory)
> > .MinimumScale = 740.25
> > .MaximumScale = 746.25
> > End With
> >
> > If it is located within a worksheet how do you reference it?

>
> --
>
> Andy Pope, Microsoft MVP - Excel
> http://www.andypope.info
>

 
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
How can I change Format Axis Scale Units of a chart ? Dan Thompson Microsoft Excel Charting 1 2nd May 2009 11:24 PM
How can I change Format Axis Scale Units of a chart ? Dan Thompson Microsoft Excel Programming 0 30th Apr 2009 05:51 PM
How do I change the scale of a chart axis? Cat Microsoft Powerpoint 1 2nd Jul 2008 02:45 PM
Need a method to Dynamicly change the X axis Scale on a chart. =?Utf-8?B?Sm9lIEhvZ2Vs?= Microsoft Excel Charting 2 9th Oct 2004 05:02 AM
Need a method to Dynamicly change the X axis Scale on a chart. =?Utf-8?B?Sm9lIEhvZ2Vs?= Microsoft Excel Charting 0 8th Oct 2004 07:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:23 AM.