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
 

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