+ Reply to Thread
Results 1 to 3 of 3

Excel Chart - Paste Special as Picture in Excel Itself

  1. #1
    Registered User
    Join Date
    11-11-2006
    Posts
    3

    Excel Chart - Paste Special as Picture in Excel Itself

    Hi All,

    I am working on a report and it needs to be generated daily. After generating and creating charts, I need to paste special those charts as "Pictures". Is there any way to do this? And also i need to paste special every single chart in the work book. I already done a code but it not working properly.. and the important point is i need to paste special the chart at the exact position where i intended to cut. Is this possible???

    Pls treat this as emergency and advice me on this.

    Thanks in advance..

    Regards
    Mohan

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    To answer part of your query

    Try

    View > Toolbar > customise. Then select commands tab > Tools > Camera.

    With this you can take a snap chart of your chart

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    11-11-2006
    Posts
    3

    Not Working

    Hi Noob,

    When i click on the chat the camera button become inactive.. then how can I take a snapshop of the chart.

    And my question is how to paste special that chart in the exact location where I am going to replace that chart with the picture

    Here is the code which i written and it works to some extent.

    Pls advice if you have any suggestions..

    Sub ChartPSpecial()
    Dim LPos, TPos, Ht, Wd
    MsgBox ActiveSheet.ChartObjects.Count
    For i = 1 To ActiveSheet.ChartObjects.Count
    'For Each chrt In ActiveSheet.ChartObjects
    ActiveSheet.ChartObjects(i).Activate
    LPos = ActiveSheet.ChartObjects(i).Left
    TPos = ActiveSheet.ChartObjects(i).Top
    Ht = ActiveSheet.ChartObjects(i).Height
    Wd = ActiveSheet.ChartObjects(i).Width
    MsgBox LPos & TPos & Ht & Wd
    ActiveSheet.ChartObjects(i).Cut
    ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False _
    , DisplayAsIcon:=False
    ActiveSheet.Pictures(i).Left = LPos
    ActiveSheet.Pictures(i).Top = TPos
    Next i
    'MsgBox chrt.ChartArea
    'Next chrt
    End Sub

+ 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