Closed Thread
Results 1 to 3 of 3

ReSizing Chart to fit Width and Columns

  1. #1
    Registered User
    Join Date
    03-13-2009
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    98

    ReSizing Chart to fit Width and Columns

    Hi,

    I am trying to Copy a Chart from 1 sheet, Paste it into another in a specific location based on Columns and ROWS.

    I have managed to get the code to copy and paste to a particular cell, however cannot re-size it to fit the required Rows and Columns.

    Steps involved are:

    1)Copy a Named Chart based on If Function in Sheet "Heart Rate"
    2)Paste into Sheet Report and Rename the Chart to "BMI"
    3)Re-size the chart to fit between Cells B3:I15 (Cannot get this to work)



    Sub Macro6()
    '
    ' Macro6 Macro
    '

    '

    If Worksheets("Heart Rate").Range("O3") = 1 Then

    Worksheets("Heart Rate").ChartObjects("Chart 2").Activate
    ActiveChart.ChartArea.Copy
    Sheets("Report").Select
    Range("B3").Select
    ActiveSheet.Paste


    ActiveChart.Parent.Name = "BMI"




    Else

    Worksheets("Heart Rate").ChartObjects("Chart 3").Activate
    ActiveChart.ChartArea.Copy
    Sheets("Report").Select
    Range("B3").Select
    ActiveSheet.Paste

    ActiveChart.Parent.Name = "BMI"



    End If

    End Sub
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: ReSizing Chart to fit Width and Columns

    1. double post @ https://www.excelforum.com/excel-pro...tml?highlight=


    2.Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
    Ben Van Johnson

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,918

    Re: ReSizing Chart to fit Width and Columns

    Welcome to the Forum, unfortunately this is a duplicate post and as such will now be closed, you may continue in your other thread.

    Thread Closed.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Resizing and Moving a chart
    By sokeefe14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2015, 10:11 AM
  2. auto column width resizing
    By misterpogiako in forum Excel General
    Replies: 4
    Last Post: 02-13-2014, 01:42 PM
  3. Excel 2007 : Resizing Chart Boxes
    By Shidoran in forum Excel General
    Replies: 2
    Last Post: 09-13-2010, 07:38 PM
  4. Exporting Word Chart to Excel (Resizing Chart)
    By bg18461 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2008, 11:49 AM
  5. [SOLVED] Resizing chart because of refreshing Chart Data through a query
    By jayb in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-10-2006, 11:25 AM
  6. Set Column Width Based On Total Width Of Other Columns
    By rayneraingoaway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 06:10 PM
  7. [SOLVED] Chart resizing handles
    By Sarge in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-30-2006, 05:15 PM

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