Insert, position, and resize a picture w/ Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm completely out of my league here. I can do most basic functions when
dealing with macros, but I need to insert a picture to a specific place in a
document. Then, I need to resize it down to half the current size of the
picture.

Can anyone help me figure out how to get a macro to do that in Excel 2003?

Thanks!
John
 
You can try this
you see it will make the picture the same size as the cell now.
If you know how gig you want it you can fill in the width and height in the code

Sub Test()
Dim myPict As Picture

With ActiveSheet.Range("C1")
Set myPict = .Parent.Pictures.Insert("C:\ron.png")
myPict.Top = .Top
myPict.Width = .Width
myPict.Height = .Height
myPict.Left = .Left
myPict.Placement = xlMoveAndSize
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top