Article ID: 186721 - Last Review: January 23, 2007 - Revision: 3.1 ACC: How to Use Automation to Modify Microsoft Graph Object in Microsoft Access 95 and Microsoft Access 97This article was previously published under Q186721 Moderate: Requires basic macro, coding, and interoperability skills.
On This PageSUMMARY
This article describes how to use Automation to add or remove a title of a
graph and how to hide or show a legend for a graph.
This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: A demonstration of the technique used in this article can be seen in the sample file, Grphsm97.exe. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base: 186855
(http://support.microsoft.com/kb/186855/EN-US/
)
ACC97: Microsoft Access 97 Sample Graphs Available in Download Center
MORE INFORMATION
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the file, or
perform these steps on a copy of the Northwind database.
NOTE: To use the Visual Basic for Applications procedures in this article, you must have a reference to Microsoft Graph. Creating a Sample GraphTo be able to use the procedures to add or to remove a title or to hide or to show a legend, first create the following form:
Adding or Removing a Graph's TitleThe following example demonstrates how to use Automation to add or remove a graph's title.
Hiding or Showing a Graph's LegendThe following example demonstrates how to hide or to show a legend on a graph.
REFERENCES
For more information about OLE Automation, search for "OLE Automation," and
then "Interoperability with Microsoft Word and Microsoft Excel (Common
Questions," using the Microsoft Access Help menu.
For further information about manipulating a chart with Visual Basic for Applications code, see the file Vba8grp.hlp. This file is located in the Morehelp subfolder of the Valupack folder on your Microsoft Office 97 Professional Edition compact disc or on your Microsoft Access 97 compact disc. You may also want to see the following article in the Microsoft Knowledge Base: 128364
(http://support.microsoft.com/kb/128364/EN-US/
)
Microsoft Graph VBA Help File Available in Download Center
| Article Translations
|

Back to the top
