How to insert a company logo image on a chart when the image is located on a worksheet as an inserted picture

smdexcel

New Member
Joined
Aug 16, 2013
Messages
2
I am able to place a logo image into the chartarea of a chart easily using

With ActiveChart.Shapes
.AddPicture "M:\coding\graphics\ma_logo.gif", False, True, ChartWidth - 120, 1, 90, 25
End With


But i would like to know how to go about inserting an image in the chartarea from a hidden worksheet .

Was thinking Something like the following :

Dim LogoPic As Picture
Set LogoPic = ActiveWorkbook.Worksheets("Hidden").Shapes("Picture 1").Copy

Then insert the picture at a specific location -
but i am having some difficulty determining how to go about this - I would appreciate any asisstance - Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I am attempting to use the following code insert two pictures that have been stored on a hidden worksheet -

Sub WbCopyLogos(ChartNumber As Integer)

Dim wb As Workbook
Dim sh As Shape
Dim LogoPic As Picture
Dim TargetWS As String
Dim item As Integer
'Dim ChartNumber As Integer
'Dim Chartname As String

For Each sh In ActiveWorkbook.Worksheets("Hidden").Shapes
If sh.Type = msoPicture Then
sh.Copy
ActiveSheet.ChartObjects(ChartNumber).Activate
With ActiveChart
.Paste
End With
End If
Next

---- Can you please tell me why this will not work ..

Thanks you, in advance, for your help .
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top