[AccessD] Working with an Excel Chart from Access (Automation) -How to Create Different Chart Types

Rocky Smolin rockysmolin at bchacc.com
Wed Jun 29 15:24:16 CDT 2011


IME, the code I cut from the Excel Macro and paste into Access always needs
a bit of tweaking.  Can you post the marco code here and maybe someone will
see the problem.

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Wednesday, June 29, 2011 12:43 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Working with an Excel Chart from Access (Automation) -How
to Create Different Chart Types

All,

I have just started to experiment with "Windows Automation" code.

I have a small Access 2007 application that uses a Record Set to
populate the cells in an Excel spreadsheet and then automatically create
a simple chart (in Excel).  This all works nicely.

Here is the Access VBA code that adds the Chart

XLSheet.Shapes.AddChart.Select

I would like to be to control the "Type" of Chart that is generated in
Excel.  

I recorded an Excel Macro while in Excel to see the code that Excel
uses.  I then tried to use this code in Access VBA, but did not have
luck.

Does anyone have an example of how to create an Excel Chart in Access
VBA and be able to control the Chart type?

Thanks for your help.

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