View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Unlocking Aspect Ratio For images

Before posting I tested LockAspectRatio in 2007 and it worked fine, both at
drawing-object level and to a shape object. At a glance your code below
should also work fine. You could also try Shapes.AddPicture

AddPicture(Filename As String, LinkToFile As MsoTriState, SaveWithDocument
As MsoTriState, Left As Single, Top As Single, Width As Single, Height As
Single) As Shape

Regards,
Peter T



"ironhydroxide" wrote in message
...
Tried, and failed, (i am not so sure I like the changes in 2007)
Any other suggestions

Wait, One change (just thought of)
With ActiveSheet.Cells(PopRow, PopCol)
Set yourPic = ActiveSheet.Pictures.Insert(Picstring)
yourPic.ShapeRange.LockAspectRatio = msoFalse
yourPic.Width = Cells(PopRow, PopCol).Width
yourPic.Height = Cells(PopRow, PopCol).Height
yourPic.Top = Cells(PopRow, PopCol).Top
yourPic.Left = Cells(PopRow, PopCol).Left
End With


Thank you 2003 recorder.

and thanks for doing that for me, i have no access to 2003