First of all a warning the commands I've used works in Excel 2007 and 2003 but as I do have Excel 2011 (Mac) I really don't know if this will work for you.
Sub OpenMRStext()
'
' OpenMRStext Macro
' Open space delimited MRS text files
'
' Keyboard Shortcut: Option+Cmd+t
Dim sPath As String
Dim sFile As String
sPath = "Macintosh HD:Users:ccc:Desktop:MRStexts:"
sFile = Dir(sPath & "*.txt")
Application.ScreenUpdating = False
Do While sFile <> ""
Workbooks.OpenText Filename:= sPath & sFile, _
Origin:=xlMacintosh, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False _
, Comma:=False, Space:=True, Other:=False
‘ your code to import text file to an Excel sheet
‘ then you must close the text file
sFile = Dir
Loop
Application.ScreenUpdating = True
End Sub
Alf
Bookmarks