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:
  1. 'cBarBtn is a CommandBarButton
  2. 'cbrCmdBar is my CommandBar
  3. Set cBarBtn = cbrCmdBar.Controls.Add(msoControlButton)
  4. Dim pic As IPictureDisp
  5. Set pic = LoadResPicture("ICON1", vbResBitmap)
  6.  
  7. 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