Consulting

Results 1 to 4 of 4

Thread: Listview ImageList VBA -?

  1. #1

    Listview ImageList VBA -?

    I have got a userform in Excel -VBE,
    I added a ListView Control and a imagelist control
    How obtain a link between both controls?
    The Options of ListView "Icon Image List" are Empty.

    Why?
    __________________

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    I don't know what an imagelist control is. Maybe you can explain your goal.

    If you attach an xls, it would be easier to help.

  3. #3
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    271
    Location
    Link the imaglist to the list view like this
    [VBA]With Me.listview1
    .Icons = imagelist1
    'add your items to the listview
    .ListItems.Add , , entDesc, idx
    End With
    [/VBA]

    You then need to add your images to the imagelist control either directly using the browser or by code
    imagelist1.ListImages.Add Picture:=LoadPicture(file)

  4. #4
    Thank you Lifeson

    I will try and after i will make the comment


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •