Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 08-03-2009, 09:00 AM
bkpdp bkpdp is offline
Registered User
 
Join Date: 03 Aug 2009
Location: India
MS Office Version:Excel 2003
Posts: 2
bkpdp is becoming part of the community
Add images to chart using vba/macro

Please Register to Remove these Ads

Hi friends,
I am quite new this forum. Wondering here for a solution which forced me to post it here. I have created a macro which produce a chart dynamically between the selected cell values on a separate sheet. One more thing i want to add is, how can i add an image to the chart (say logo) using macro so that it will be shown for every chart pages that it creates. Even will be interested if any extra text can be added in the same way. Thanks in advance.
Reply With Quote
  #2  
Old 08-03-2009, 09:07 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Guru
 
Join Date: 10 May 2004
Location: Essex, UK
MS Office Version:2003 & 2007 sp2
Posts: 7,223
Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding
Re: Add images to chart using vba/macro

It's not clear whether you want a shape embeded in the chart or printed page.

Can you post example workbook it illusrate where the shape would be placed.
__________________
Cheers
Andy
www.andypope.info
Reply With Quote
  #3  
Old 08-03-2009, 09:58 AM
bkpdp bkpdp is offline
Registered User
 
Join Date: 03 Aug 2009
Location: India
MS Office Version:Excel 2003
Posts: 2
bkpdp is becoming part of the community
Re: Add images to chart using vba/macro

Hello.. the macro code goes here..

Sub Chart()
Dim myRange As Range
Set myRange = Range("A4:A13")
Charts.Add
ActiveChart.ChartType = xlRadar
ActiveChart.SetSourceData Source:=myRange, _
PlotBy:=xlColumns

End Sub

when this sub assigned to a button, it works fine however i want an image to be produced with the new sheet.
Thanks
Reply With Quote
  #4  
Old 08-03-2009, 10:14 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Guru
 
Join Date: 10 May 2004
Location: Essex, UK
MS Office Version:2003 & 2007 sp2
Posts: 7,223
Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding
Re: Add images to chart using vba/macro

Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here


Try using the macro recorder when inserting picture into chart sheet.
__________________
Cheers
Andy
www.andypope.info
Reply With Quote


Reply

Bookmarks

Tags
add images to graph


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump