title: How to get selected path and name of the file opened with file dialog?
body: <p>I need the path name and file name of the file that is opened with File Dialog. I want to show this information with a hyperlink in my worksheet.</p>
  
  <p>With this code I have the file path:</p>
  
  <pre><code>Sub GetFilePath()
  
  Set myFile = Application.FileDialog(msoFileDialogOpen)
  With myFile
      .Title = "Choose File"
      .AllowMultiSelect = False
      If .Show &lt;&gt; -1 Then
          Exit Sub
      End If
  FileSelected = .SelectedItems(1)
  End With
  
  ActiveSheet.Range("A1") = FileSelected
  End Sub
  </code></pre>
  
  <p>I'm still looking for a way to get the filename.</p>