ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   LoadPicture(FileName) with size? (https://www.excelbanter.com/excel-programming/417121-loadpicture-filename-size.html)

Charlotte E.

LoadPicture(FileName) with size?
 
I have the following line in my VBA code:

Image1.Picture = LoadPicture(FileName)

....and it works fine :-)


But, since the picture is being shown in a UserForm, I would like to make
sure that it gets loaded in the right size, so I use:

Image1.Picture = LoadPicture(FileName), 400, 300

....but for some reason this goes wrong?!?

Even that the LoadPicture have both [widthDesired As Long] and
[heightDesired As Long] options?

What am I doing wrong???


TIA,




Nigel[_2_]

LoadPicture(FileName) with size?
 
All parameters should be enclosed e.g.

Image1.Picture = LoadPicture(FileName, 400, 300)


--

Regards,
Nigel




"Charlotte E." wrote in message
...
I have the following line in my VBA code:

Image1.Picture = LoadPicture(FileName)

...and it works fine :-)


But, since the picture is being shown in a UserForm, I would like to make
sure that it gets loaded in the right size, so I use:

Image1.Picture = LoadPicture(FileName), 400, 300

...but for some reason this goes wrong?!?

Even that the LoadPicture have both [widthDesired As Long] and
[heightDesired As Long] options?

What am I doing wrong???


TIA,





Charlotte E.

LoadPicture(FileName) with size?
 
That's it - thanks :-)


"Nigel" skrev i en meddelelse
...
All parameters should be enclosed e.g.

Image1.Picture = LoadPicture(FileName, 400, 300)


--

Regards,
Nigel




"Charlotte E." wrote in message
...
I have the following line in my VBA code:

Image1.Picture = LoadPicture(FileName)

...and it works fine :-)


But, since the picture is being shown in a UserForm, I would like to make
sure that it gets loaded in the right size, so I use:

Image1.Picture = LoadPicture(FileName), 400, 300

...but for some reason this goes wrong?!?

Even that the LoadPicture have both [widthDesired As Long] and
[heightDesired As Long] options?

What am I doing wrong???


TIA,








All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com