method ExplorerBar.ReplaceIcon ([Icon as Variant], [Index as Variant])
Adds a new icon, replaces an icon or clears the control's image list.

TypeDescription
Icon as Variant A long expression that indicates the icon's handle, or a IPictureDisp object.
Index as Variant A long expression that indicates the index where icon is inserted
ReturnDescription
LongA long expression that indicates the index of the icon in the images collection
Use the ReplaceIcon property to add, remove or replace an icon in the control's images collection. Also, the ReplaceIcon property can clear the images collection. Use the Images method to attach an image list to the control.  Use the SmallIcons property to select the icon's size. Use the Images method to attach an image list to the control.

The following VB sample shows how to add a new icon to control's images list:

 i = ExplorerBar1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle), in this case the i specifies the index where the icon was added

The following VB sample shows how to replace an icon into control's images list::

 i = ExplorerBar1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle, 0), in this case the i is zero, because the first icon was replaced.  

The following VB sample shows how to remove an icon from control's images list:

 ExplorerBar1.ReplaceIcon 0,  i, in this case the i must be the index of the icon that follows to be removed

The following VB sample shows how to clear the control's icons collection:

 ExplorerBar1.ReplaceIcon 0,  -1