Results 1 to 2 of 2

Thread: Changing MSChart97 properties from Access

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Unhappy

    I've been trying to change the properties of an imbedded OLE object (MSChart97 chart) at runtime from an MSAccess database. I can change the chart title, but cannot change the axis titles in code as I cannot find how to reference them. I've been told that I can export the data to Excel, draw the graph there using a macro and then import the OLE object back into Access. This however is a bit of a nightmare too (the graph comes back in black and white). Can anyone help? - or at least tell me where a useful help file is located?

    Thanks
    Richyrich

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Leavenworth KS USA
    Posts
    482
    The ChartWizard method may help, also check MSDN article Q147803. Code snippet:

    Dim TheChart As Chart
    Set TheChart = ActiveSheet.ChartObjects(1).Chart
    ' reformat Chart1 as line chart, adds legend, category and value axis titles.
    TheChart.ChartWizard Gallery:=xlLine, HasLegend:=True, CategoryTitle:="X-axis", ValueTitle:="Y-Axis"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width