Hi,
Does any one knows how to show the image in the right hand side of the userform based upon the condition.
Say example,
i have userform with following list
1. Name (combobox)
2. Age (will come automatically based upon the name selection)
3. Occupation (will show automatically based upon the name selection)
I would like to create a picture box in the right hand side of the userform which shows the image for the respective name. ( i have more than 30 names).
Please help me guys,
Thanks
open image in the userform based upon the condition
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18
-
- Administrator
- Posts: 78474
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: open image in the userform based upon the condition
Option 1:
Create an image control for each name. Place the image controls on top of each other.
When the user selects a name, set the Visible property of all image controls to False except for the one corresponding to the selected name; that should be set to True.
Option 2:
Save the images as separate files (.jpg, for example) in the same folder as the workbook.
Place one image control on the userform, and set its Picture property to the path+filename of the image file corresponding to the name.
Create an image control for each name. Place the image controls on top of each other.
When the user selects a name, set the Visible property of all image controls to False except for the one corresponding to the selected name; that should be set to True.
Option 2:
Save the images as separate files (.jpg, for example) in the same folder as the workbook.
Place one image control on the userform, and set its Picture property to the path+filename of the image file corresponding to the name.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 179
- Joined: 30 Sep 2014, 15:18