View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
Mohan Kumar Karunakaran Mohan Kumar Karunakaran is offline
external usenet poster
 
Posts: 5
Default Graphic Data Marker in Excel 2007 Charts

Hi Andy,

Thanks for your help. This solved my problem but I have one more question. I
tried to insert an image from the below mentioned link (a pin).

http://members.aol.com/%5Fht%5Fa/wiseowlsw/shadows.htm

So when I save this picture to my harddrive and used the module provided by
you the image is loaded as datamarkers but with a border around it.

Is there anyway to show only the icon without the borders. The file
extension is .gif

Thanks in advance,
Mohan

"Andy Pope" wrote:

Hi,

Create a line chart with 2 series. Then with the chart selected run this
routine.
Make sure you change the UserPicture filename to one that is on your system.

Sub MyMarkers()
' from file
With ActiveChart.SeriesCollection(1)
.Format.Fill.UserPicture "C:\Waterfall.jpg"
.MarkerSize = 20
End With

' from shape on worksheet
With ActiveChart.SeriesCollection(2)
ActiveSheet.Shapes("Picture 1").Copy
.Paste
End With
End Sub

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Mohan Kumar Karunakaran"
wrote in message ...
Hi,

I would like to add some pictures as data markers in my line chart using
excel VBA. I tried recording a macro to do this but the code is not
generated
for the insert picture part. Does any one have an idea for this.

Regards,
Mohan