View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
PatrickS PatrickS is offline
external usenet poster
 
Posts: 26
Default Treeview on a sheet

I neglected to show the line of code that isn't working:

Set ThisWorkbook.Sheets("Sheet1").OLEObjects("tvConten ts").Object.ImageList
= ThisWorkbook.Sheets("Sheet1").OLEObjects("ImageLis t").Object

(ImageList and tvContents obviously being the name of the image list and
treeview control respectively)

"PatrickS" wrote:

I've added a treeview to a sheet in excel, but I'm having problems using the
ImageList control to store and show images in the treeview control. I'd
successfully managed to get this to work when using it in a dialog, but
unfortunately this is not the case when it exists on a sheet rather than
within a form (this is within excel 2003 BTW)

Does anybody here know how to use imagelists with treeviews when the
treeview and imagelist exists on a sheet?