Code: Select all
Public Class Formmain
Private Sub btntimfileexcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntimfileexcel.Click
Dim urlfilehoso As New FolderBrowserDialog
If urlfilehoso.ShowDialog = Windows.Forms.DialogResult.OK Then
txtfilehosoexcel.Text = urlfilehoso.SelectedPath
End If
Try
For Each filehoso As String In IO.Path.GetDirectoryName("*.xls")
txtfilehosoexcel.Text = Path.GetFileName(filehoso)
Next
Catch
End Try
End Sub
End Class



