View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Insert picture using Macro..

You need to get the larger of the width or height variable and adjust it to 100

pict.LockAspectRatio = msoTrue
if pict.width pict.height then
pict.width = 100
else
pict.height = 100
end if

" wrote:

I have a macro that I use to insert pictures in excel but I am having
difficulty with the picture size, I would like the picture to keep the
Aspect Ratio but to have a maximum of 100 height and a maximum 100
width is this possible, any help is appreciated.
Thanks.