Hey, i'm trying to load a custom icon for from a .res file and place it on a command bar button. I found some really straight example code, but for some reason it errors.
here is the example code:
http://msdn.microsoft.com/library/de...HV03083192.asp
Here is my code
VB Code:
'cBarBtn is a CommandBarButton 'cbrCmdBar is my CommandBar Set cBarBtn = cbrCmdBar.Controls.Add(msoControlButton) Dim pic As IPictureDisp Set pic = LoadResPicture("ICON1", vbResBitmap) cBarBtn.Picture = pic 'this line errors
when i put a watch on cBarBtn, both the .Picture properties and .Mask properties are listed as <Automation Error>
I don't know what i need to to do fix it, i'm lost, any help would be great
thanks




Reply With Quote