View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default LoadPicture - how to keep .jpg compression

Hi,

I need to create a user form programatically - most work
already done. I also use
ThisWorkbook.VBProject.VBComponents
("UserForm1").Designer.Image1.Picture = LoadPicture
("c:\test.jpg") to assign a picture to the "Image1" component.

It works fine, but when I save the result, the .jpg is probably
decompressed and saved in .bmp - the size of .xls file is
about 2 MB, althought it should contain just a 80 kB jpg file.

Is it possible to keep the picture compressed? (when I add
the image manualy, it works fine, just the LoadPicture
seems to decompress it).

Kind regards,

Karel Rys