[AccessD] Modifying Charts with VBA

Dan Waters df.waters at comcast.net
Thu Feb 3 16:56:28 CST 2011


This is a link to the MS Graph 10 Object Model.  
http://msdn.microsoft.com/en-us/library/aa141052(office.10).aspx

Could be a different version for Access 2007.  Per this you should have a
file on your PC name VBAGR10.chm if you've installed Access XP.  I've got it
and it's in C:\Program Files(x86)\Microsoft Office\Office11\vbagr10.chm.

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Thursday, February 03, 2011 4:35 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Modifying Charts with VBA

All, 

I am starting to explore the use of Charts in a small Access 2007
application.

>From the Access 2007 Design tab I have used the "Insert Chart" button to
fire up the "Chart Wizard" to create some test charts.

Once created, I have used the "Chart Object / Edit" facility to modify
the generated chart.

I don't really like the build-in facility to Edit the Chart Object to
make changes.

I have experimented a bit with VBA code to make cosmetic changes.  I
understand how to make simple changes to a chart, such as changing the
colors with commands like this. 

Reports.report2.Graph1.ChartArea.Interior.ColorIndex = 5
Reports.report2.Graph1.PlotArea.Interior.ColorIndex = 6

I would like to find an example of how to change other things such as
chart type, size, font sizes, etc.

Does anyone have examples of how to do this with VBA?

Perhaps there is a resource on the web that explains this.

I have done some digging but no luck so far.

Thanks,
Brad      

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list