-
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
-
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
-
Replies: 0
Last Post: 02-20-2003, 11:43 PM
-
By Michael Cole in forum VB Classic
Replies: 0
Last Post: 08-20-2001, 07:35 AM
-
By Juergen Thuemmler in forum VB Classic
Replies: 8
Last Post: 05-21-2001, 04:50 PM
-
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
Forum Rules
|
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
|
Bookmarks