Placing an Image in an Excel Chart

  • From within Access 97, I'm able to place an image on an Excel graph, but I can't move the image to the precise location that I would like it to be.

    Can you tell me where to find the method or property that I need to use to place the image exactly where I would like it to be?

    This is how I'm placing the image:

    Dim objExcel As New Excel.Application 
    Dim objChart As Excel.chart 
    Set objChart = objExcel.ActiveChart 
  • Re: Placing an Image in an Excel Chart


    This will center you image within the chartarea.[vba]Sub x()
    Dim objChart As Excel.Chart
    Set objChart = objExcel.ActiveChart
    With objChart.Pictures.Insert("C:\Pictures\Google\mozart.gif")
    .Left = (objChart.ChartArea.Width - .Width) / 2
    .Top = (objChart.ChartArea.Height - .Height) / 2
    End With

    End Sub[/vba]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!