• VBA Charting in 2003

    Author
    Topic
    #467155

    I have a charting utility that plots data with VBA. It worked fine with XL97 – XL2000. It almost works with XL2003, but the chart sizing is driving me crazy. On a Chart Sheet, I want to set the ChartArea height & width and the PlotArea height & width. I seem to be able to set the PlotArea size, but the ChartArea keeps autosizing to the width of the sheet. Any ideas on how to stop the autosizing? TIA –Sam

    Viewing 2 reply threads
    Author
    Replies
    • #1212164

      Tell us more about the utility – what is it called, where did it come from, is the code accessible?

    • #1212167

      Code is too complicated, I may make a simple version that shows the problem.

      But, you can see the problem outside of code:

      Create a simple scatter chart —
      In A1:B2, put some data, say 1, 2, 3, 4
      Select A1:B2 & press the chart wizard.
      Choose XY (Scatter) & take all of the defaults except step 4: tick “As a new sheet”

      Fix the other new features of 2003:
      Click in the Chart Area & use the arrow keys to navigate to plot area
      Resize the plot area to use the upper-left 1/4 of the Chart Area
      Click on the Series 1 label & delete it

      Now, you should be able to resize the Chart Area, but you cannot. If the height is max, you can change the width. And if the width is max, you can change the height. But, you cannot change both!

      BTW, documentation for 2003 says Height & Width are read only, unlike every other version! Agggggggggggg!

      Currently trying to use an embedded chart instead of a chart sheet.

    • #1212281

      This is NOT a solution, but interestingly (or not)


      If you create the chart in 2003, chart area appears to be non sizeable ON the Chart sheet, and also using VBA.
      Then save it as .xls


      Now open it up in 2007.
      It can be now be sized, so looks like they added it into 2007.


      So, now save it (standard .xls) in 2007.


      Now open it in 2003 and voila, the chart area of the chart sheet is sizeable in 2003.


      Have not figured out how to, or even if it is possible to change the read only nature
      of the height and width property of the chart area in 2003 though,
      but implications are that it ought to be possible.







      This is snapped from the Excel 2003 at the end of the above process.


      I know it doesn’t really help but …..



    Viewing 2 reply threads
    Reply To: VBA Charting in 2003

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: