Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

Simple ListView question

I've got a database returning data to a Listbox, and I want to take the contents of the ListBox and display them in a ListView

Can somebody supply me with the code

Cheers,

Matt.
0
Matt_Unsworth
Asked:
Matt_Unsworth
1 Solution
 
paulstampCommented:
Assuming list1 and listview1 are the two controls :

    Dim nCount As Integer
   
    ListView1.View = lvwList
   
    If List1.ListCount > 0 Then
        For nCount = 0 To List1.ListCount - 1
            ListView1.ListItems.Add , , List1.List(nCount)
        Next nCount
    End If


That should do the trick
0
 
Matt_UnsworthAuthor Commented:
Simple, concise.....fitted straight into my code

Cheers paulstamp
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now