Pergunta

I want to Browse a File on button click And get file path in a text box.

Here is what I have tried :

FolderBrowserDialog1.ShowDialog()
TextBox66.Text = FolderBrowserDialog1.SelectedPath

This is not working. Any suggesions ?

Foi útil?

Solução

You can try this:

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles        Button1.Click
    Dim oFileDlg As New OpenFileDialog
    oFileDlg.ShowDialog()
    textbox1.text = oFileDlg.FileName
End Sub
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top