Results 1 to 2 of 2

Resize a Chart to fit Width and Columns

Threaded View

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

    Post Resize a 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
    Last edited by sajeel; 10-07-2017 at 05:41 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ReSizing Chart to fit Width and Columns
    By sajeel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2017, 08:26 PM
  2. how to resize column width in the worksheets
    By aaaaa34 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2014, 07:55 PM
  3. [SOLVED] [How to] If width of selected picture is bigger than 25 cm, resize picture width to 25 cm
    By 1tane1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2013, 09:12 AM
  4. Auto-resize Column Width
    By dk54 in forum Excel General
    Replies: 3
    Last Post: 03-29-2011, 10:55 PM
  5. Not showing column width during resize
    By branco in forum Excel General
    Replies: 2
    Last Post: 01-08-2010, 07:52 AM
  6. Resize Last Row to Fill a Page Width
    By Sloth in forum Excel General
    Replies: 0
    Last Post: 02-17-2006, 06:30 PM
  7. [SOLVED] How do I resize the columns in a graph chart?
    By Rita in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 01-16-2006, 01:25 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