Copying Chart as Picture to Powerpoint With transparent background?

Horus

New Member
Joined
Jun 4, 2014
Messages
5
Good afternoon,

First of all thank you for taking the time to attempt to solve my issue.
Now straight to the point: one of my macros copies charts to a powerpoint presentation, unfortunately since the source for each chart only exists for a brief period (after which they are deleted), the charts lose their data (YValues) once the cells are cleared, which is a big problem. I also tried to manually setup the YValues via Array, but unfortunately excel only accepts fixed values for an array (perhaps I could just use a loop and set the array values and that would work? Actually going to try that as I write this <UPDATED> Nop, doesn't work either.). So I came to the conclusion that the only possible option is to post the chart as a picture onto powerpoint. The issue is, as I do so, the transparent background is replaced with a white background, which looks bad, terribly bad since my presentations have a grey background.

Any solution to the problem?

Thanks in advance.
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Are your cells filled in white in Excel? I just tested and if you paste it as a picture (windows metafile) then it will match the background already there. If you selected Bitmap, it will keep the background as Excel. That was for normal cells.

For charts, I noticed that the options are different. If I select Paste Special - Microsoft Office Graphic Object, it will be transparent. However, the Picture/Bitmap makes the background the same as Excel (at least the no fill in Excel).
 
Upvote 0
Actually I tried all the options just to be sure (Picture, GIF,PNG, EnhancedMetafile, OLEObject, etc) , and still, the idiotic white background is there.
@anthoya2369 - Actually, there is no fill (other than the default Excel fill, if that counts, then its white), but what is weird is that if I copy the chart (as chart, not as picture), it is transparent!

The problem could be solved if I could have the charts's YValues not being linked to the worksheet (since the cells are cleared) but generated on the fly from the value of the cells before they are cleared. But unfortunately, that isn't possible apparently.

Thank you both for your replies!
 
Last edited:
Upvote 0
You could set the Chart Area and Plot Area to No Fill.
Apparently, it works, thank you Andrew!
Just in case I decided to use both solid fill and disable the visibility.
In case someone is wondering, here it is:
Code:
.Chart.ChartArea.Format.Fill.Solid
.Chart.ChartArea.Format.Fill.Visible = False
.Chart.PlotArea.Format.Fill.Visible = False
.Chart.ChartArea.Format.Line.Visible = False
The last line removes the borders.

Anyway, thank you both for your time! The issue is solved.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,838
Messages
6,162,286
Members
451,759
Latest member
damav78

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