VBA to load image into plot area

lynxbci

Registered User.
Local time
Today, 03:43
Joined
Nov 27, 2007
Messages
73
Hi
Hi have a graph (graph0) in a report in access, which has a nice image embedded in the plot area. I would like to change this image depending
on the content of the report (name field).

Is there a vba way to load picture into the plot area?

Thanks :banghead:
 
the image is a separate control, is it? if so:

yourControl.picture = "c:\somepath\somepics.bmp"
 
No, that wont work Graph does not support pictures

Graph0.Picture = "952QV HOOD OUTER.jpg"

"Object doesn't support this property or method"

It is just the plot area that needs an image not the chart object
 
To use arnelgp's suggestion you will need to the the background for the Graph to transparent. Next place an image control under the Graph control. Use the VBA code to change the Image control's .Picture property.
 
The problem is that you can produce that graph but have to save it first into a file format that is compatible with an image control. I have seen reports and spreadsheets saved that included a graphed image, but so far I have not seen a way to directly export any other format. At best you could superimpose your separately generated chart over something else.
 

Users who are viewing this thread

Back
Top Bottom