Question : Open Folder path and place in TextBox

I want to let the user navigate to a folder location using the Folder Browser Dialog and have the file path displayed in a text box for other uses.  I'm attaching my start at the coding, but something's not working.  I can get to the folder, but it won't display the path in the textbox.  Please help!  

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        FolderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer
        FolderBrowserDialog1.Description = "Select Output Folder Location"
        FolderBrowserDialog1.ShowDialog()
        'Windows.Forms.DialogResult.OK = OutFolder
        FolderBrowserDialog1.SelectedPath = OutFolder

        MsgBox(FolderBrowserDialog1.SelectedPath)

End Sub

    Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged

        TextBox8.Text = FolderBrowserDialog1.SelectedPath

    End Sub

Answer : Open Folder path and place in TextBox

Replace

MsgBox(FolderBrowserDialog1.SelectedPath)

With

TextBox8.Text = FolderBrowserDialog1.SelectedPath

in the  Button1.Click event

Random Solutions  
 
programming4us programming4us