A
Arnaud
Step to reproduce :
- launch excel (2003 in my case)
- insert an imageList (MSComctlLib.ImageListCtrl.2)
- add 1 picture in it : properties->Custom->Images->Insert Pictures
with index : 1 and key : "aa"
- insert an imageCombot (MSComctlLib.ImageComboCtl.2)
- insert a button
- add the following code to the button :
Private Sub CommandButton1_Click()
Sheet1.ImageCombo1.ImageList = Sheet1.ImageList1
Sheet1.ImageCombo1.ComboItems.Add 1, "aa", "captionaa", "aa"
Sheet1.ImageCombo1.ComboItems.Add 2, "bb", "captionbb", "bb"
End Sub
save your work
--> if you close sheet all is ok
--> if you push button (= if you execute the vba code) and you close sheet
excel crashes
- execute code by pusshing the
I have found this very similar support but it doens't speak about crash :
http://support.microsoft.com/?kbid=194910
What I have done wrong ?
- launch excel (2003 in my case)
- insert an imageList (MSComctlLib.ImageListCtrl.2)
- add 1 picture in it : properties->Custom->Images->Insert Pictures
with index : 1 and key : "aa"
- insert an imageCombot (MSComctlLib.ImageComboCtl.2)
- insert a button
- add the following code to the button :
Private Sub CommandButton1_Click()
Sheet1.ImageCombo1.ImageList = Sheet1.ImageList1
Sheet1.ImageCombo1.ComboItems.Add 1, "aa", "captionaa", "aa"
Sheet1.ImageCombo1.ComboItems.Add 2, "bb", "captionbb", "bb"
End Sub
save your work
--> if you close sheet all is ok
--> if you push button (= if you execute the vba code) and you close sheet
excel crashes
- execute code by pusshing the
I have found this very similar support but it doens't speak about crash :
http://support.microsoft.com/?kbid=194910
What I have done wrong ?