Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Graphs (Excel 97)

    Hi all,

    I need some help here, What I would like is to create a graph! But I would like to do it in VBA, here's my question, I want to use the date as my X axis, and Time for my Y axis.
    Can I use a custom format for an array?
    Since each month changes, number of days of the month, am I going in the right direction?

    Thanks, Darryl.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Graphs (Excel 97)

    You can create and modify charts in VBA, but the end result is the same as a chart created "manually". You'll have to provide some more details about what you want to accomplish.
    Do the data for the chart exist on a worksheet, or do you have to construct them, or ...?
    What is the structure of the data to be charted?

  3. #3
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Graphs (Excel 97)

    Hans,

    What I would like to do is display my graphs in a Userform, and have the user input the data from the form. The input would be the time, and the day fof the month would be the X axis, and Time would be the Y axis, with the input from the user style chart.

    I do have another Question, is it possible to fill an array from an inputbox?

    Thanks, Darryl.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Graphs (Excel 97)

    Userforms have no built-in support to display charts. There is a workaround, see Displaying a Chart in a UserForm. It requires you to create the chart in the workbook first, export it to a file, then display it on the userform. A lot of work, if you ask me.

    If you're going to fill arrays, I would stay away from InputBox, it is not really user-friendly. Since you're working with a userform instead, use that for data input too.

    But it's probably much easier to let the user enter data in a worksheet, and create the chart in a worksheet or on a separate chart sheet. You'd only need a few command buttons on the worksheet to run the code to create the chart etc.

  5. #5
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Graphs (Excel 97)

    I'll check it out

    Thanks
    Hans.

Posting Permissions

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