Want to control a Excel chart's attributes from Access

C

Carolyn Schmidt

Hi,
I hope someone can help me. I have an Excel template that
I drop data into from Access. There is a chart in Excel
referring to the data. The new data shows up in the source
ranges without any problem.

But the charts maximum scale and major unit are not
appropriate to the data.

I've tried using this type of reference:
ActiveSheet.ChartObjects("Chart 3").Axes
(xlValue,xlPrimary).MaximumScale = x
But I get an error message that says "object doesn't
support this property or method".

That tells me I haven't refered to the object correctly.

Can someone suggest how I might refer to the axes on a
Excel chart from Access?

Thanks,
Carolyn
 
T

Tim Ferguson

I've tried using this type of reference:
ActiveSheet.ChartObjects("Chart 3").Axes
(xlValue,xlPrimary).MaximumScale = x
But I get an error message that says "object doesn't
support this property or method".

That tells me I haven't refered to the object correctly.

Ummm: I think you are probably better off asking this in an Excel
programming group. On a related note, have you thought of doing the entire
process in Excel -- the VBA is exactly the same and you can set a reference
to either DAO or ADO and carry on using all the same data access methods
that you use in Access. Only much quicker and more reliable than using
automation.

Just a thought


Tim F
 

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