Greetings everyone,
I recently discovered the ImageComboBox to display images in a dropdown menu and this is something really handy. Unfortunately, I'm having issues to make it work properly.
I have an ImageCombobox Control and an Imagelist Control.
Imagelist Control:
The pictures have been added to the Imagelist Control. Keys are labeled "A1" and "A2".
ImageCombobox:
In the properties, the image list has been set on "ImageList1" (name of the Imagelist Control).
The VBA code I'm using:
Private Sub Workbook_Open()
With Sheets("Sheet1").ImageCombo1
.ComboItems.Clear
.ComboItems.Add 1, "A1", "", 1
.ComboItems.Add 2, "A2", "", 2
End With
End Sub
My problem:
If I run the code, it's actually working. However, if I close the document and I reopen it, the images are no longer displayed in the dropdown menu.
In order to display them again, I have to do the following:
- Go to the ImageCombobox properties.
- Set the image list to "none" and click "Apply.
- Set the image list to "ImageList1" and click "OK".
- Open the VBA code and press F5 to run the code.
My guess is that I'm missing a trigger event but I thought that "Private Sub Workbook_Open()" was used as an event...
May I ask if someone has any idea about what's wrong?
Thanks in advance for your help.
Bookmarks