Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Treeview/imagelist problem

hi,

i have a EXCEL template file which loads a VBA dialog containing
TREEVIEW control and IMAGELIST.

i use the following code

Private Sub UserForm_Initialize()

ImageList1.ListImages.Add 1, , LoadPicture("e:\sclose.ico")
ImageList1.ListImages.Add 2, , LoadPicture("e:\sopen.ico")

Set TreeView1.ImageList = ImageList1

With TreeView1
.Nodes.Clear
.Nodes.Add , , "Root", "Venku", LoadPicture("e:\sclose.ico")
LoadPicture("e:\sopen.ico")
.Nodes.Add "Root", tvwChild, "XX", "Shruthik"
.Nodes.Add , , "Root1", "Mouna"
End With
End Sub

but i am getting an error :
Invalid Object while @ Set TreeView1.ImageList = ImageList1

can anybody suggest me whats wrong with this code.

thanks
-ravi

Attachment filename: book1.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=61292
--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TreeView marijan glavac[_2_] Excel Programming 2 April 30th 04 07:28 AM
How to use Treeview control with Imagelist kvenku[_2_] Excel Programming 0 April 7th 04 01:52 PM
Interesting Treeview problem. RB Smissaert Excel Programming 1 January 26th 04 06:35 PM
strange problem For Each loop in Treeview Peter Beach Excel Programming 12 August 26th 03 02:46 PM
strange problem For Each loop in Treeview RB Smissaert Excel Programming 0 August 25th 03 07:18 PM


All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"