I ran a test with your code, changing the "Const strPath " to a path on my computer.
I also had to delete "frbubr" from the transfer text command, because I don't know what your import specification is.
The first time I executed the code, it bombed. The problem is a missing back slash after "load"
Code:
Const strPath As String = "O:\Accounting\load\" 'Directory Path
This worked for me:
Code:
Public Function REN()
Const strPath As String = "O:\Accounting\load\" 'Directory Path
Dim strFile As String 'Filename
Dim strFileList() As String 'File Array
Dim intFile As Integer 'File Number
' Dim rs As DAO.Recordset '<<-- not used so I commented it out
'Loop through the folder & build file list
strFile = Dir(strPath & "*.txt")
While strFile <> ""
'add files to the list
intFile = intFile + 1
ReDim Preserve strFileList(1 To intFile)
strFileList(intFile) = strFile
strFile = Dir()
Wend
'see if any files were found
If intFile = 0 Then
MsgBox "No files found"
Exit Function
End If
'cycle through the list of files & import to Access
'creating a new table called MyTable
For intFile = 1 To UBound(strFileList)
DoCmd.TransferText acImportDelim, frbubr, "RENFILES", strPath & strFileList(intFile), False
Next
End Function