excel vba - Scale a picture in VBA -


currently trying scale picture in vba, cannot seem need. every time run though....

activesheet.pictures.insert("c:\\\logo.bmp").select             selection                   .shaperange.scalewidth 1.4, msotrue                   .shaperange.scaleheight 0.5, msofalse              end  

it scale correct width initially, when go next line , try scale height changes width. can me understand why happens , suggest better way of scaling picture. need 125% bigger in length , 50% smaller in height.

thanks much.

include line:

.shaperange.lockaspectratio = msofalse 

to allow both width , height being "unlocked", put right on top.

with selection     .shaperange.lockaspectratio = msofalse     .shaperange.scalewidth 1.4, msotrue     .shaperange.scaleheight 0.5, msofalse end 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -