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

Darryl Collins Darryl.Collins at iag.com.au
Wed Jun 29 17:04:36 CDT 2011


_______________________________________________________________________________________

Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________



If you are using XL2007 then be aware that MS broke the VBE recording functionality for many chart (and other objects) in this release.  Charts are in general know to be less than stellar in XL2007 compared to other versions (namely 2003 and 2010).



________________________________________
From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks [BradM at blackforestltd.com]
Sent: Thursday, 30 June 2011 5:42 AM
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
_______________________________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended 
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon this information, by persons or entities other than the intended recipient is 
prohibited.

If you have received this in error, please contact the sender and delete this e-mail 
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute 
the information contained in this e-mail and any attached files, with the permission 
of the sender.

This message has been scanned for viruses.
_______________________________________________________________________________________




More information about the AccessD mailing list