By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Excel Chart automation through Access

P: 5
Hi there
This Question was posted on a wrong site.

Just as introduction I am working in Access VBA where I coded a routine to retrive data from Access Database, exporting it on to Excel file (sucessful opens and posts the data on the required number of sheets) and finally is supposed to plot a scattered graph.

At this stage the routine successful exports the data to excel but I am having a problem with the chart plotting part.

Even though the code for generating the plot is fine, the routine does not like some chart required parameters such as

with Chart
.Axes(xlCategory, xlPrimary)
.ChartType=xlXYScatter

and the like. I need to plot a scattered graph and need to state the parameters with out which I am getting a bar chart.

I believe I have set ticked all the references required which are listed below.

1) Visual Basic for Application
2) Microsoft Access 11.0 Object Library
3) OLE Automation
4) Microsoft DAO 3.6 Object Library
5) Microsoft ActiveX Data Objects 2.1 Library
6) Microsoft Office web components 11.0
7) Microsoft Office XP Web Components
8) Microsoft forms 2 Object Library
9) Microsoft ADO Ext 2.8 for DDL and Security
10) Microsoft Excel 11.0 Object Library

I have, however, a missing Macrobrowser and I was not able to restore it or find any information about.

I would appreciate it if u could give me an idea as to what is happening.

Thanks
Mar 13 '07 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,494
Hi there
This Question was posted on a wrong site.

Just as introduction I am working in Access VBA where I coded a routine to retrive data from Access Database, exporting it on to Excel file (sucessful opens and posts the data on the required number of sheets) and finally is supposed to plot a scattered graph.

At this stage the routine successful exports the data to excel but I am having a problem with the chart plotting part.

Even though the code for generating the plot is fine, the routine does not like some chart required parameters such as

with Chart
.Axes(xlCategory, xlPrimary)
.ChartType=xlXYScatter

and the like. I need to plot a scattered graph and need to state the parameters with out which I am getting a bar chart.

I believe I have set ticked all the references required which are listed below.

1) Visual Basic for Application
2) Microsoft Access 11.0 Object Library
3) OLE Automation
4) Microsoft DAO 3.6 Object Library
5) Microsoft ActiveX Data Objects 2.1 Library
6) Microsoft Office web components 11.0
7) Microsoft Office XP Web Components
8) Microsoft forms 2 Object Library
9) Microsoft ADO Ext 2.8 for DDL and Security
10) Microsoft Excel 11.0 Object Library

I have, however, a missing Macrobrowser and I was not able to restore it or find any information about.

I would appreciate it if u could give me an idea as to what is happening.

Thanks
It's really hard to imagine that anyone can help in your particular situation without being there. You're description of your situation would need to be extraordinarily detailed and accurate for anyone even to have the information they would need, quite apart from the time and inclination to get involved in anything so complex.

MODERATOR.

The best I can do for you (And this may well not be much use at all I'm afraid) is to post this link (Application Automation) to help with that side of things.
Mar 15 '07 #2

P: 5
Thank you NeoPa to have taken the time to read me question.

I agree it is quite complicated but I knew no better way out but to ask.

In a nut shall just to give u an idea what is happening with me.

I am working in Access environment where I open an Excel file, export data and try to plot the data.

Now was is happening is that for some reason the Access compiler does not like words such as xlCategory or xlPrimary, xlCircle, xlXYScatter and the like. I worked around some using their numerical representations. that is to say
Instead of
xlCategory --> (1)
xlPrimary --> (1)
xlCircle --> (8)
xlXYScatter --> (72)

I have however still some more I was not able to find their numerical representations. If any one have a list of terms with their numerical values please let me know.

Thank you once again.


It's really hard to imagine that anyone can help in your particular situation without being there. You're description of your situation would need to be extraordinarily detailed and accurate for anyone even to have the information they would need, quite apart from the time and inclination to get involved in anything so complex.

MODERATOR.

The best I can do for you (And this may well not be much use at all I'm afraid) is to post this link (Application Automation) to help with that side of things.
Mar 16 '07 #3

NeoPa
Expert Mod 15k+
P: 31,494
Two points.
  1. Have you added a 'Reference' from Access to the Excel Library?
  2. Search for it using the 'Object Browser' in the VBA Window (F2).
Mar 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.