Code to resize image

  • Thread starter Thread starter Gotroots
  • Start date Start date
G

Gotroots

I want to use a command button to resize an image in a worksheet. I tried to
generate the code by recording a macro. However I have just leaned this is
not possible using Office 2007.

Most great full if someone could assist with supplying the code for this.
 
Dim myWS as excel.worksheet
Dim myShape as Excel.Shape

Set myWS = ActiveSheet
Set myShape = myWS.Shapes("EnterShapeName")

With myShape
.LockAspectRatio = msoFalse
.width = 500
.height = 300
end with
 
Back
Top