I have a textbox full of processes like this:
VB Code:
[System Process] System smss.exe csrss.exe winlogon.exe services.exe svchost.exe svchost.exe svchost.exe Smc.exe VB6.EXE firefox.exe
etc.. I want to loop through it and put it into a listbox.
Printable View
I have a textbox full of processes like this:
VB Code:
[System Process] System smss.exe csrss.exe winlogon.exe services.exe svchost.exe svchost.exe svchost.exe Smc.exe VB6.EXE firefox.exe
etc.. I want to loop through it and put it into a listbox.
Is there a Carrage Return at the end of each item? If so, you can use the SPLIT function to separate them and put them into an array and then you could simply load the listview.Quote:
Originally Posted by skankerer
VB Code:
Option Explicit Private Sub Command1_Click() Dim strText() As String Dim a As Long 'Split will divide the items in the text box by 'the vbNewLine Character and put the items into 'the strText Array strText = Split(Text1.Text, vbNewLine) 'This will take every item in the strText Array 'and add it to the Listbox For a = 0 To UBound(strText) List1.AddItem strText(a) Next a End Sub