View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Adding icons to a listview on a userform



in the form:
check that you have an imagelist object
check that the imagelist contains 16x16 icons or bitmaps
check the KEYs for the images.

in the form's initialize procedure bind the imagelist
to the listview

Set lvwNames.SmallIcons = Me.imlForm


when adding items to the listview indicate which SmallIcon to use..

Set li = lvwNames.ListItems.Add( _
Key:="UniqueItemKey", _
Text:="Description", _
SmallIcon:="IconKey")


HTH :)




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Richard wrote :

Hi

Does anyone know why the icons for a listview (report
style) are not displayed, when the item is added?

There is no error. Just no icon displayed.

Thanks in advance