Sowanso
08-30-2006, 03:34 AM
Hello there,
I am trying to create custom toolbar with custom Icons on it. But that's where I've got stuck.
At first I tried frequent approach with creating the toolbar within the VBA code. Pictures were previously stored in a worksheet, so I just copied them and used .pasteFace procedure. But it doesn't work very well, since the icons lost their transparency and got awfully blurred.
So I moved on to the Toolbar Control combined with the ImageList as described e.g. here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingimagecombocontrol.asp) . But the problem is that even if I set everything in the ImageList, I am not able to locate it within the Toolbar preferences. The rolldown menu just states there is no ImageList to choose from. In the button settings page the Image input is therefore disabled.
Therefore I tried to assign the ImageList to the Toolbar manually by the code using Toolbar.ImageList = ImageList1 and when nothing happened I tried to assign the picture to the button manually using Toolbar.Buttons.Item(1).Image = ImgList.ListImages(1).Picture. But even this approach gives me Invalid Key RunTime Error '35603'.
Do you have any ideas?
I am trying to create custom toolbar with custom Icons on it. But that's where I've got stuck.
At first I tried frequent approach with creating the toolbar within the VBA code. Pictures were previously stored in a worksheet, so I just copied them and used .pasteFace procedure. But it doesn't work very well, since the icons lost their transparency and got awfully blurred.
So I moved on to the Toolbar Control combined with the ImageList as described e.g. here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingimagecombocontrol.asp) . But the problem is that even if I set everything in the ImageList, I am not able to locate it within the Toolbar preferences. The rolldown menu just states there is no ImageList to choose from. In the button settings page the Image input is therefore disabled.
Therefore I tried to assign the ImageList to the Toolbar manually by the code using Toolbar.ImageList = ImageList1 and when nothing happened I tried to assign the picture to the button manually using Toolbar.Buttons.Item(1).Image = ImgList.ListImages(1).Picture. But even this approach gives me Invalid Key RunTime Error '35603'.
Do you have any ideas?