lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I followed a video on how to put a pic in a UserForm. A combobox has (dog,cat, car) as a list and if user select cat, a pic of cat will appear in the from. I did exactly and it is working. But the code I did not understand is this
Private Sub ComboBox1_Change()
Image1.Picture = LoadPicture(ThisWorkbook.Path & "" & ComboBox1.Value & ".jpg")
End Sub
Would appreciate any explanation to understand the code. Thank you.
The video can be found here
https://www.youtube.com/watch?time_continue=94&v=8welfqk8s3c
I followed a video on how to put a pic in a UserForm. A combobox has (dog,cat, car) as a list and if user select cat, a pic of cat will appear in the from. I did exactly and it is working. But the code I did not understand is this
Private Sub ComboBox1_Change()
Image1.Picture = LoadPicture(ThisWorkbook.Path & "" & ComboBox1.Value & ".jpg")
End Sub
Would appreciate any explanation to understand the code. Thank you.
The video can be found here
https://www.youtube.com/watch?time_continue=94&v=8welfqk8s3c