I am trying to find a way to display images, typically jpg files, into a ctrl in a userform in excell using vba. (using office365 64bits)
I have tried using the loadpicture function :
but I get this error message : Run-Time error -2147418113 (8000fffff) : Method LoadPicture of object _Application failed
And I also tried assigning the file directly without using the function :
but I get a filetype mismatch error
Although I am not shure, it looks like the loadpicture() function maybe did work in previous excel versions.
I have search everywhere to get an answer as to why it doesn not work and I found the 2 following answers :
1. You can't use the LoadPicture method to set the Picture property of an image control. This method works with ActiveX controls only. To set the Picture property of an image control, simply assign to it a string specifying the file name and path of the desired graphic.
2. VBA will not allow assignment of bitmap handles at runtime using LoadPicture() to ANY object that has a .Picture property.
Yet, I find people in youtube that shows step by step procedure that does not work for me and for many others since I found many people looking to solve that problem.
anyhelp would be greatly appreciated,
Thank you
Bookmarks