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

Windows 10 launch event as it happened: Read our Windows 10 launch live blog - find out first as...

IDG UK Sites

Windows 9 and the death of the OS as a must-have product

IDG UK Sites

Video trends: 4K is here – HDR video, VR and 3D audio is coming

IDG UK Sites

Best iPhone 6, iPhone 6 Plus deals: iPhone 6, iPhone 6 Plus tariffs, contracts and prices UK