I’ve created a stacked bar graph. Now using visual basic I'm trying to format the data series for each of the series, and fill it with a stacked and scaled image. The images are pictures of numbers from 0 – 9. Here’s a snippet of the code I’m struggling with:</SPAN>
With ActiveChart.SeriesCollection(2)</SPAN>
ActiveSheet.Shapes("0").Copy ‘This copies a textbox named “0” which is on the worksheet. The textbox has a 0 written inside it.</SPAN>
.Paste ‘This makes all of SeriesCollection(2) use the image from the textbox as fill. This part works well.</SPAN>
PictureFormat = xlStackScale 'I’m trying to tell excel to then stack the image, not stretch it, which is what it’s doing by default.
'This bit is not working, having no effect. It’s not returning an error however.</SPAN>
PictureStackUnit = 1 'Trying to tell it to do one picture for each duplicated value. This doesn’t seem to be having any
'effect. Not returning an error.</SPAN>
.Fill.Visible = True 'Don’t seem to need this. Changing it to false does make the series invisible though.</SPAN>
End With</SPAN>
With ActiveChart.SeriesCollection(2)</SPAN>
ActiveSheet.Shapes("0").Copy ‘This copies a textbox named “0” which is on the worksheet. The textbox has a 0 written inside it.</SPAN>
.Paste ‘This makes all of SeriesCollection(2) use the image from the textbox as fill. This part works well.</SPAN>
PictureFormat = xlStackScale 'I’m trying to tell excel to then stack the image, not stretch it, which is what it’s doing by default.
'This bit is not working, having no effect. It’s not returning an error however.</SPAN>
PictureStackUnit = 1 'Trying to tell it to do one picture for each duplicated value. This doesn’t seem to be having any
'effect. Not returning an error.</SPAN>
.Fill.Visible = True 'Don’t seem to need this. Changing it to false does make the series invisible though.</SPAN>
End With</SPAN>