LoadPicture into UserForm
You need to post the code of the procedure MyLoadPicture.
RBS
"Charlotte E." wrote in message
...
Hi,
I have a UserForm, in which I need to import some images from time to
time.
Currently I'm using:
Image_3_A.Picture = LoadPicture(Path & Picture)
...which is working fine :-)
But I always need to perform some actions before showing the image, so I
figured, I'll do my own UDF, which both does all the action, and as the
last line in the UDF prase the path and picture to the function.
I did the function, called MyLoadPicture, which works fine until the very
last line:
MyLoadPicture = LoadPicture(Path & Picture)
This very last line gives an 'Object required' error!?!
I think it as to do with IPictureDisp object, but how to make it work???
I was kind of hoping to be able to use my function like the normal
'LoadPicture' function, i.e.:
Image_3_A.Picture = MyLoadPicture(Path & Picture)
Thanks in advance,
CE
|