VBA Macro to insert image in a userform (Calling the images from the worksheet itself)
VBA Macro to insert image in a userform (Calling the images from the worksheet itself)
(OP)
Hello,
I am trying to display an image on a userform depending on the choice of a combo box and the code below works fine:
picturename = "S:blablablabalabalab\blabla\" & name & ".jpg"
Userform.Image.Picture = LoadPicture(picturename)
However, I would like to avoid referring to the location S:blablablabalabalab\blabla\
Instead I would like to retrieve the image from an Excel worksheet itself (that I would hide afterwards).
In fact, the macro I am implementing will be used by several users on different computers, thus creating potential errors if they don't have access to that specific location (S:blablablabalabalab\blabla\)
Is there any way to that? call the images from the images from the worksheet itself?
Thanking you for your help in advance.
I am trying to display an image on a userform depending on the choice of a combo box and the code below works fine:
picturename = "S:blablablabalabalab\blabla\" & name & ".jpg"
Userform.Image.Picture = LoadPicture(picturename)
However, I would like to avoid referring to the location S:blablablabalabalab\blabla\
Instead I would like to retrieve the image from an Excel worksheet itself (that I would hide afterwards).
In fact, the macro I am implementing will be used by several users on different computers, thus creating potential errors if they don't have access to that specific location (S:blablablabalabalab\blabla\)
Is there any way to that? call the images from the images from the worksheet itself?
Thanking you for your help in advance.





RE: VBA Macro to insert image in a userform (Calling the images from the worksheet itself)
https://answers.microsoft.com/en-us/msoffice/forum...
Tesak
http://scripts4all.eu/txtoncurve/ - Text along a curve for Catia V5
RE: VBA Macro to insert image in a userform (Calling the images from the worksheet itself)
this is not really a CATIA question, you should try https://stackoverflow.com/ for programming help
indocti discant et ament meminisse periti
RE: VBA Macro to insert image in a userform (Calling the images from the worksheet itself)
Indeed it is too complicated to use WIN API for my case.
As I had only 15 images to choose with the combobox, I decided to do differently:
I created 15 images control in the userform which are therefore overlapped and I copy/pasted ( picture property) my pictures in each one of them.
This method works fine and the images are saved in the Workbook itself.