![]()
Sub Opendialog9() Dim strFile As String, strPath As String ' Prompt user to select a file With Application.FileDialog(msoFileDialogOpen) .InitialFileName = ThisWorkbook.Path & "\*.xls*" .Title = "Please Select a File" .AllowMultiSelect = False .Show If .SelectedItems.Count = 0 Then Exit Sub ' User clicked cancel: Exit strFile = .SelectedItems(1) End With Range("B2") = strFile End Sub
Bookmarks