Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
jfiorillo
 
Posts: n/a
Default How do I change a Chart's axis scale from visual basic?

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?
  #2   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope
 
Posts: n/a
Default How do I change a Chart's axis scale from visual basic?

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
  #3   Report Post  
Posted to microsoft.public.excel.charting
jfiorillo
 
Posts: n/a
Default How do I change a Chart's axis scale from visual basic?

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
The best method for forumlas and charts??? Sharon Excel Discussion (Misc queries) 0 May 9th 05 11:56 PM
Excel Charts - Data being Plotted beyond Primary X-Axis Scale Yvonne Fochesato Charts and Charting in Excel 1 May 1st 05 03:36 AM
Visual Basic Error Message Scubasocks Excel Discussion (Misc queries) 0 January 28th 05 03:29 PM
change axis info on radar charts alfred Charts and Charting in Excel 1 January 11th 05 04:36 AM
secondary axis scale Kent Smith Charts and Charting in Excel 3 January 4th 05 07:37 PM


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"