Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    3

    Unanswered: accessing the chart with VBA

    Hi!
    I have created an unbound form Form1. That form includes ObjectFrame. That object frame was created automaticaly, when I created chart (Chart1) with wizard.
    How can I change the look of the chart with VBA (for example: chart title, axis titles,...)?. When I'm changing the data for Chart1 with RowSource property, then I would like to make some changes to the look of the chart.

    troman

  2. #2
    Join Date
    Oct 2003
    Location
    US
    Posts
    343

    Re: accessing the chart with VBA

    You first have to create an instance of gaph. Using late binding technique or early binding. With early binding you get the advantage of having intellisense help.

    Anyway declare a variable like

    dim objGph as object

    and then instantiate it like this
    Set objGraph = Me![Graph1].Object.Application.Chart

    now you have the graph demon at your command..


    Originally posted by troman
    Hi!
    I have created an unbound form Form1. That form includes ObjectFrame. That object frame was created automaticaly, when I created chart (Chart1) with wizard.
    How can I change the look of the chart with VBA (for example: chart title, axis titles,...)?. When I'm changing the data for Chart1 with RowSource property, then I would like to make some changes to the look of the chart.

    troman

  3. #3
    Join Date
    Nov 2003
    Posts
    3

    Re: accessing the chart with VBA

    Thank you for your help.
    Obviously I still didn't make samething as it should be. In the attached file I would like to change the title of the chart in Form1 with clik on the buttons. As I uderstand the code I wrote is for late binding. Early binding will be better because of easier coding. Maybe you can help me?

    Thank you
    troman
    Attached Files Attached Files

  4. #4
    Join Date
    Sep 2003
    Location
    Indonesia
    Posts
    2
    I'm not familiar with late binding or early binding (I'm new in database) but I found this code from Access help (I use Access XP) and change your code and it works. I hope it help !
    Attached Files Attached Files

Posting Permissions

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