We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

Excel 2007 Macro to add photo


BrendanKK

Likes # 0

I have created a macro to add a photo to an Excel 2007 workshet and added a link to the macro to the Quick Access Toolbar. However when I click the icon on the Quick Access Toolbar to add the picture, nothing happens.

The same procedure works fine in Word 2007. What is different with Excel?

Like this post
Noldi

Likes # 0

I think if you copy and paste your macro on here I'm sure somebody will sort it out.

Noldi

Like this post
BrendanKK

Likes # 0

I create macro using the following steps: DEVELOPER Tab > Record Macro > (Input Macro name "Signature" ) > OK INSERT Tab > Picture > (Click on "Signature" picture file to import) DEVELOPER Tab > Stop Recording.

The Macro reads as follows

Sub Signature() ' ' Signature Macro '

' End Sub

When I run Macro nothing happens

Like this post
VoG II

Likes # 0

The macro recorder has not captured anything. You need something like

Sub piccy()

ActiveSheet.Pictures.Insert ("C:\example\pic.jpg")

With ActiveSheet.Shapes(ActiveSheet.Shapes.Count)

.LockAspectRatio = False

.Top = Range("C3").Top

.Left = Range("C3").Left

.Height = Range("C3").RowHeight

.Width = Range("C3").Width

End With

End Sub

Like this post
BrendanKK

Likes # 0

Vog, As always your a star.

Thank you. B

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

Best Black Friday 2014 tech deals: Get bargains on smartphones, tablets, laptops and more

IDG UK Sites

What the Internet of Things will look like in 2015: homes will get smarter, people might get fitter

IDG UK Sites

See how Trunk's animated ad helped Ade Edmondson plug The Car Buying Service

IDG UK Sites

Yosemite tips: Complete Guide to OS X Yosemite