0

Im using

For Each foundFile As String In My.Computer.FileSystem.GetFiles( _
    My.Computer.FileSystem.SpecialDirectories.MyDocuments, _
    FileIO.SearchOption.SearchAllSubDirectories, "*element.txt")

            ListBox1.Items.Add(foundFile)

to get file paths. There are 3 elements for example. And i need them to become variables. (a,b,c)
And show in labels

Label1.text= a
Label2.Text =b
Label3.Text =c

Label1 will show the first file path and so on...

How can i transfer FilePaths to variables?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by steve11
0
ListBox1.SetSelected(0, True)
        Label1.Text = ListBox1.SelectedItem.ToString
        ListBox1.SetSelected(1, True)
        Label2.Text = ListBox1.SelectedItem.ToString
        ListBox1.SetSelected(2, True)
        Label3.Text = ListBox1.SelectedItem.ToString
0

Elaborate more on what you mean by 3 elements in a filepath

to get file paths. There are 3 elements for example. And i need them to become variables. (a,b,c)
And show in labels

Label1.text= a
Label2.Text =b
Label3.Text =c

Label1 will show the first file path and so on...

How can i transfer FilePaths to variables?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.