View Single Post
  #2  
Old 03-11-2004, 13:04
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: nonproportional sizing/scaling

VBA recorder isn't smart enough to recognize the actual stretching mode. It just specifies both horizontal and vertical dimensions of the new object.

However, the method SetSize itself is capable of calculating the missing parameter to keep the object size constrained. Just modify your recorded macro like this:

Code:
s1.SetSize 5
To make the object to be scaled to 5" wide and keep the height proportional, or:

Code:
s1.SetSize , 8
to make the height of the object to be 8" and recalculate the width.

If you specifies both the width and the height, the object is stretched unproportionally.
Reply With Quote