Excel VBA - How to Get File using File Dialog Box

Опубликовано: 05 Декабрь 2014
на канале: InAnOffice
42,947
329

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


Смотрите видео Excel VBA - How to Get File using File Dialog Box онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь InAnOffice 05 Декабрь 2014, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 42,947 раз и оно понравилось 329 людям.