+ Reply to Thread
Results 1 to 4 of 4

Resize and position charts in Excel 2003 vs 2010 VBA

  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    NA, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Resize and position charts in Excel 2003 vs 2010 VBA

    Hi there,
    I am struggling with the (non)compatibility of Excel 2003 VBA code vs Excel 2010 VBA code.What I want to do is position and scale a chart on the screen based on the position and size of a number of rows/columns. Ideally, I would like to select the cells and position/size the chart to cover the cells (as in Excel 2010).
    In Excel 2010, I do it like this:
    Please Login or Register  to view this content.
    Now, I can get Excel 2003 to do something similar with the following code (although it doesn't appear very reliable):
    Please Login or Register  to view this content.
    Is there someone out there that knows a better way of doing this ... and of automatically recognising which version of Excel is in use and selecting the code automatically?
    Would be really grateful for some help here!
    Thank you

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Resize and position charts in Excel 2003 vs 2010 VBA

    This worked in xl2003, 07 and 10

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    06-13-2011
    Location
    NA, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Resize and position charts in Excel 2003 vs 2010 VBA

    Hi Andy, that works like a dream - thank you!

  4. #4
    Registered User
    Join Date
    12-20-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Resize and position charts in Excel 2003 vs 2010 VBA

    Thank you for this code - helps me a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1