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.
With this code I ha
From office 2010, we won't be able to use the common dialog box control, so it's nice to use the Application object to get the desired results.
Here I got a text box and Command button - paste the following code under the command button click event, which will open the file dialog box and add the File name to the Text box.
Dim sFileName As String
sFileName = Application.GetOpenFilename("MS Excel (*.xlsx), *.xls")
TextBox1.Text = sFileName