Not sure if you can call it from within a macro, since I never use
macros. but there's code to do it right here...
http://www.mvps.org/access/api/api0001.htm
You could create a button that called this and then passed the result
to the TransferText command...
this is assuming that you grabbed the code from the above link and
dropped it into it's own module and saved it... then you can just do
something like this....
Private Sub Command0_Click()
'create a variable to hold the filename to import.
Dim strFileToImport As String
If Len(strFile) <> 0 Then
strFileToImport = basOpenSaveFileAPI.TestIt
DoCmd.TransferText acImportDelim, , "MyTable", strFileToImport,
True
Else
MsgBox "please specify a file to import!"
End If
End Sub
You'll need to modify the TransferText stuff to suit your situation -
the file type (is it delimited?), what table your data is going into,
etc...