ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PlotArea picture from wbk? (https://www.excelbanter.com/excel-programming/286319-plotarea-picture-wbk.html)

Charley Kyd[_2_]

PlotArea picture from wbk?
 
The only method I can see for adding a picture to a plot area is...
ActiveChart.PlotArea.Fill.UserPicture
....which has a PictureFile argument that looks to a saved picture file.

Is there a way to programatically add a picture to the plot area using a
bitmap saved in the workbook?

Thanks.

Charley




Tim Barlow

PlotArea picture from wbk?
 
Charley,

Stephen Bullen produced a procedure for converting pictures stored in the
workbook into bitmaps:

"Creates a standard Picture object from whatever is on the clipboard.
This object can then be assigned to (for example) an Image control
on a userform. The PastePicture function takes an optional argument of
the picture type - xlBitmap or xlPicture."

I've used his code previously to capture pictures from a workbook and place
them on a userform. It might work for a chart.

Check out Stephen's website at
http://www.bmsltd.co.uk/Excel/Default.htm

and scroll down until you find PastePicture.

HTH

Tim

"Charley Kyd" wrote in message
...
The only method I can see for adding a picture to a plot area is...
ActiveChart.PlotArea.Fill.UserPicture
...which has a PictureFile argument that looks to a saved picture file.

Is there a way to programatically add a picture to the plot area using a
bitmap saved in the workbook?

Thanks.

Charley






Wei-Dong Xu [MSFT]

PlotArea picture from wbk?
 
Hi Charley,

Thank you for posting in MSDN managed newsgroup!

So far as I know, we can only specify one file stored in the disk for the plotarea with UserPicture. This is by design.

Furthermore, from my experience, if you want to use one stored BMP file from the workbook, you may need to save this picture into one BMP file in
the disk and then specify this picture to the plotarea.

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.




All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com