+ Reply to Thread
Results 1 to 2 of 2

Import Picture into Chart in Excel

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Bournemouth, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Import Picture into Chart in Excel

    Hi,

    I'm trying to copy a range of cells from one worksheet and paste them into a chart in another worksheet.
    However it keeps coming up with the same error which is:

    Run-time error '-2147024809 (80070057)':
    The item with the specified name wasn't found.

    The Code stop at this piece of code 'ActiveSheet.ChartObjects("DAILY").Activate'.

    The cells I am copying are in tab 'Div Dashboard' and the Chart (and tab) is called 'Daily'

    Does anyone have any ideas why it doesn't work?

    Alterntiavely, I can get the code to create the Chart, but can't seem to re-size it, so the picture ends up landscape instead of more squared.

    Full Code Below:


    Sheets("Div Dashboard").Select
    Set oRange = Range("B2:AG67")

    oRange.CopyPicture xlScreen, XlPictureAppearance.xlPrinter

    Range("AH43").Select
    ActiveWindow.SmallScroll Down:=27
    Range("A2:AG67").Select
    Range("AG67").Activate
    Selection.Copy
    Sheets("DAILY").Select
    ActiveSheet.ChartObjects("DAILY").Activate
    ActiveChart.Pictures.Paste.Select
    Sheets("Div Dashboard").Select
    Range("AH25").Select
    Application.CutCopyMode = False

    oCht.Paste ([XlPictureAppearance.xlPrinter])


    Thanks
    Paul

  2. #2
    Registered User
    Join Date
    06-20-2013
    Location
    Bournemouth, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Import Picture into Chart in Excel

    It's okay - I have fixed it - thanks.

+ 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