J
John
Hi there,
I've got a form with a listbox (lstWrkFiles) that populated with a number of
files. I'm trying to pass this list of files to an array (so I can use it
later). However, I've the code below "Sub FileArray()" is meant to fire
when I click on the btnNext1 button, but nothing happens. Can anyone spot
what I'm doing wrong?
Thanks
John
Private Sub btnNext1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNext1.Click
'Populate Array
FileArray()
End Sub
Public Sub FileArray()
Dim List As New ArrayList
Dim filePath As String
For Each filePath In lstWrkFiles.Items
List.Add(filePath)
Next
Dim Item As String
For Each Item In List
Console.WriteLine(Item)
Next
Console.ReadLine()
End Sub
I've got a form with a listbox (lstWrkFiles) that populated with a number of
files. I'm trying to pass this list of files to an array (so I can use it
later). However, I've the code below "Sub FileArray()" is meant to fire
when I click on the btnNext1 button, but nothing happens. Can anyone spot
what I'm doing wrong?
Thanks
John
Private Sub btnNext1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNext1.Click
'Populate Array
FileArray()
End Sub
Public Sub FileArray()
Dim List As New ArrayList
Dim filePath As String
For Each filePath In lstWrkFiles.Items
List.Add(filePath)
Next
Dim Item As String
For Each Item In List
Console.WriteLine(Item)
Next
Console.ReadLine()
End Sub