title: file name in the text box after browsing using usiner form in VBA?
body: <p>How can I return the file name of an excel file after selecting it using the <code>browse button</code> and then the <code>TextBox</code> next to the <code>browse button</code> should display the file name?</p>
  
  <p><strong>Here is my Browse button code:</strong></p>
  
  <pre><code>Private Sub inputfilebrowse_Click()
  
  Dim pathString As String
  Dim resultWorkbook As Workbook
  Dim found As Boolean
  fileToOpen = Application.GetOpenFilename(FileFilter:= _
               "Excel Workbooks (*.xls*),*.xls*", Title:="Open Database File")
  
  If fileToOpen &lt;&gt; False Then
      MsgBox "Open " &amp; fileToOpen
  End If
  
  '---check if it's already opened
  'For Each wb In Workbooks
      'If InStr(pathString, wb.Name) &gt; 0 Then
         'Set resultWorkbook = wb
          'found = True
          'Exit For
      'End If
  'Next wb
  End Sub
  
  Private Sub inputsheetpath_Change()
      fileToOpen.Value = TEinputsheetpath_Change.Text
  End Sub
  </code></pre>