Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You would have more luck with the charttype if you found out the information from the series rather than the chart. ActiveChart.SeriesCollection(1).charttype = xlWhatever The other thing to do is use error handling. If you wrote some wrapper functions to get each of the required properties you could handle the error within the routine and return relevant information. Cheers Andy Matt McQueen wrote: Alright folks, I'm trying to write some code that determines whether a chart axis has the following properties: minimumscale maximumscale majorunit minorunit minimumscaleisauto maximumscaleisauto minorunitisauto majorunitisauto Obviously not all chart types have these properties. The code I'm using to try and get these values is: varMinimumScale = ActiveChart.Axes(xlCategory,xlPrimary).MinimumScal e where varMinimumScale is a variant. Clearly, if the chart is a bar chart, for example, this will crash (a 1004 error). I've failed in trying to determine this association using If ActiveChart.ChartType = xlWhatever because apparently my charts are of type -4111 (they're all scatter plots with two y-axes and lines without markers). I can't find any mention of numeric chart types in the helpfile or on the net. Putting a break in the code and progressing step by step shows that xlXYScatter also produces a number in the -4000 range, whereas other charts have numbers more like 0-100. Does anyone have a list of excel's numeric chart types or some code that would do the job for me (by trapping the 1004 error or something clever)? Cheers, Matt -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert numeric field from type 1 to type 2 | Excel Programming | |||
numeric values in a chart | Charts and Charting in Excel | |||
How do I display non-numeric values in a scatter chart? | Charts and Charting in Excel | |||
how do i show non-numeric values graphically in a chart? | Charts and Charting in Excel | |||
Values on 'y' axis - columm chart type | Charts and Charting in Excel |