How do you scale a pictureLink object in Excel 2010

Posted by vzczc on Stack Overflow See other posts from Stack Overflow or by vzczc
Published on 2010-04-26T12:48:36Z Indexed on 2010/04/26 12:53 UTC
Read the original article Hit count: 336

Filed under:
|
|
|

In Excel 2007 it is possible to scale a pictureLink object (created with the Camera Tool) using the following VBA code.

With ActiveWorkbook.Sheets(sht).Pictures(name)
    .ShapeRange.ScaleWidth scaleValue, msoTrue
    .ShapeRange.ScaleHeight scaleValue, msoTrue
    .top = top
    .left = left
End With

This code places the picture correctly in 2010, but the scaleValue is ignored. The 2010 Excel documentation is patchy on this subject. The same code works fine in Excel 2007.

© Stack Overflow or respective owner

Related posts about excel

Related posts about excel-2010