Setting ListBox Entry

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Setting ListBox Entry

  1. #1
    Join Date
    Jan 2006

    Setting ListBox Entry

    As I'm going through my all list entries using For...Next, I want to be able to modify the entries if they meet certain conditions.

    A. How do I set strFCLine to the current entry of my For....Next?

    B. How do I change my list entry to the content of the variable?

    Private Sub mnuFCMod_Click()
    Dim strFCLine As String
    Dim Item() As String
    Dim i As Integer

    For i = 0 To List1.ListCount - 1

    strFCLine = List1.Text 'Question A?


    List1.Text = strFCName 'Question B?

    ReDim Preserve Item(i)
    Item(i) = List1.List(i)

    Next i

    List1.Tag = List1.ListCount

    End Sub

  2. #2
    Join Date
    Dec 2003
    Use the List property to set/get the text of a list item:

    'get the text of list item
    strFCLine = List1.List(i)

    'set text of list item
    List1.List(i) = strFCLine

Similar Threads

  1. OVERSEAS Online Data Entry Information
    By jai in forum Careers
    Replies: 0
    Last Post: 02-20-2003, 11:43 PM
  2. Setting tabstops in a Checkbox-style Listbox
    By Michael Cole in forum VB Classic
    Replies: 0
    Last Post: 08-20-2001, 07:35 AM
  3. Ownerdrawn Listbox Entry
    By Juergen Thuemmler in forum VB Classic
    Replies: 8
    Last Post: 05-21-2001, 04:50 PM
  4. Ownerdrawn Listbox Entry
    By Juergen Thuemmler in forum VB Classic
    Replies: 0
    Last Post: 05-20-2001, 02:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center