Excel VBA Learn how to get selected path of the file using file dialog box
The code used in this video:
Sub GettingFile()
Dim SelectedFile As String
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Title = "Select file"
.ButtonName = "Confirm"
.InitialFileName = "C:\"
If .Show = -1 Then
'ok clicked
SelectedFile = .SelectedItems(1)
MsgBox SelectedFile
Else
'cancel clicked
End If
End With
End Sub
Watch video Excel VBA - How to Get File using File Dialog Box online without registration, duration hours minute second in high quality. This video was added by user InAnOffice 05 December 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 42,947 once and liked it 329 people.