Filling the plot area of a chart with a custom picture already in Excel

JaeDyAy

New Member
Joined
Nov 8, 2011
Messages
6
Good day, Excel peeps...!

I'm currently struggling with a problem of which I'm uncertain there's a perfectly desirable solution. The background is that I have a macro which creates six scatter charts and modifies each of them so that their gridlines, axis etc are consistent with eachother. As information elsewhere in the file is edited, these axis can end up with different maximum and minimum values.

I am aiming to insert a cropped version of a picture within the plot area, where the cropping is based upon maximum and minimum values of each axis. I'm reasonably sure I'm able to crop a picture correctly, however the only way I can find to set a plot area's fill to be a custom picture is if I tell VBA to find the picture from within a folder and upload it, like this:

For Each chChart In Worksheets("Charts").ChartObjects
chChart.Chart.PlotArea.Format.Fill.UserPicture ("Original1.bmp")
Next chChart

I have recently discovered that I'm able to name pictures, as well as copy, paste and crop them. My higher-ups wouldn't be too happy if I started saving images in their folders and it's a rather messy workaround; is there any way to set the user picture to be a picture that is already in the Excel file?

Thank you for your time~! :)
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,215,965
Messages
6,127,967
Members
449,414
Latest member
sameri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top