Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Automating Excel Chart

Status
Not open for further replies.

DaddyNackers

Programmer
Oct 4, 2002
16
US
I am having a difficult time automating Microsoft Excel via Microsoft Access code. I dumped my Access data into specified Microsoft Excel worksheets and want to create charts from that data. My problem is that Access doesn't allow me to manipulate any chart series other than the first. Here is a sample of my code....

**********************************************
'Chart1 is already initialized
'There are already two series present, I just
'want to manipulate them

Chart1.Activate
Chart1.SeriesCollection(1).name = "First Series"
Chart1.SeriesCollection(2).name = "Second Series"
**********************************************

It's weird because the "First Series" works fine, but when the computer wants to name the second one, I get the following error...

**********************************************
Run-time Error '1004'
Unable to set the Name property of the Series Class
**********************************************

I appreciate any and all help.

Thanks,
Nackers
 
Hi!

Can you just set the chart the way you want it in the excel book having it access information from a specific cell range and then have Access dump the information into the cell range that the chart is looking at? This should work unless the chart will need to change depending on the data.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top