Have a look at the GetOpenFilename method. This will return the path/file name which you can then use in your code.



    fileToOpen = Application _
    .GetOpenFilename("Text Files (*.txt), *.txt")
    If fileToOpen = False Then exit sub


    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;" & fileToOpen  _
        , Destination:=Range("$B$4"))
        .Name = "00 "