View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt McQueen Matt McQueen is offline
external usenet poster
 
Posts: 23
Default Chart Type - numeric values

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