Insert Image

Brendon87

New Member
Joined
Oct 2, 2017
Messages
5
Hi all

I am trying to get the shapes.AddPicture function to work.

I have tried two methods of input which from my searching should do the same thing, granted I am new to VBA so I may be misinterpreting. Any help would be greatly appreciated!

first method code:
With ActiveSheet.Shapes.AddPicture("G:\__Logos - BD\Safire\4. Safire Triangle\Safire Triangle (Blue) Side by Side (transparent).jpg", msoFalse, msoTrue, 50, 50, 120, 80)

error: Application-defined or object-defined error

second method code:
With ActiveSheet.Shapes.AddPicture()
Filename = "G:\__Logos - BD\Safire\4. Safire Triangle\Safire Triangle (Blue) Side by Side (transparent).jpg"
LinktoFile = msoFalse
SavewithDocument = MsoTriState
Left = 50
Top = 50
Width = 120
Height = 80
End With

error: Expected variable or procedure, not module

Regards
 
Is the sheet protected, and are you certain that the path is correct?
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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