Problem with ScaleType propert for Axis object

S

SixSigmaGuy

An application, that I originally wrote in Excel 2003 VBA, creates an Axis object (xlValue) and then sets the ScaleType property = xlLinear. When I run the application in Excel 2007, though, I get an error:

Run-time error '-2147467259 (80004005)';

Method 'ScaleType' of object 'Axis' failed.

Any idea why I would get this message? I set several other properties on this object just fine; it's only the ScaleType property that fails. Unfortunately, my Axis comes out all wrong when I don't set this property. When I run the exact same application on another machine that only has Excel 2003 on it (i.e., no Office 2007 at all), the application runs perfectly and the Axis looks beautiful.

Note, I tried changing xlLinear to the new 2007 enumeration xlScaleLinear, but that didn't help. Not surprising since the value didn't change for the enumeration, only the name.

I can provide code if anyone thinks it will help.
 
A

AD@Alog

I too have the same problem, tried the same remedies to no avail. I will
turn on the macro recorder, create a plot with linear scaling and see what
'07 code generates. I am using a scatter plot when I have these issues, not
sure if the problem exists with line plots.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top