DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    5

    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?

    Code

    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
    Posts
    52
    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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links