PDA

View Full Version : Re-Sizing JPG help



Tezzies
02-24-2008, 04:33 AM
I have a sheet which is in a shared workbook. On open it loads a picture which should resize it self but wont because of the share limitations.

My only solution is to load the pictures into another workbook (which is not shared) and resize them here then save the pictures at the correct size. Which is H=98 W=72.
My problem is this---- Excel seems to save them in there original state ie. to big . Can vba phyically re-size a jpg or will I need to use a 3rd party tool.

Many thanks in advance

mdmackillop
02-24-2008, 07:10 AM
I think you'll need a third party tool. Have a look at Irfanview (http://www.irfanview.com/) and this KB item (http://vbaexpress.com/kb/getarticle.php?kb_id=839) where I made use of it.

Tezzies
02-25-2008, 02:07 AM
I feared as much, thanks for Links I will investigate further.

Many Thanks :thumb

ProteanBeing
02-25-2008, 10:22 AM
I don't know exactly what you are trying to do but if you change the image property PictureSizeMode to 3 the picture will adjust to the best size possible. Change the BackColor to match your backcolor and remove the border by changing BorderSytle to 0. This should give the illusion of a correctly sized picture.