This macro will ask the user to select the directory and find the file. You just have to add your code to get data from that file. As noted this macro is part of a macro published by jindon on this forum.
Sub Dir_Select() 'From jindon, a guru from this forum
Dim myDir As String, fn As String, txt As String, n As Long
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show Then myDir = .SelectedItems(1)
End With
If myDir = "" Then Exit Sub
fn = Dir(myDir & "\*.datatxt")
If fn = "" Then
MsgBox "no .txt files found"
Exit Sub
End If
'If you want to find the next file in this directory (if needed)
'uncomment next line
'fn= dir
Bookmarks