This is the full code.
GetProjectlogBestanden is the modified version that I rewrote so that it works
GetProjectlogBestanden2 is the original code that fails with Office 365 Business

Public Function GetProjectlogBestanden(tPath As String, tName As Variant) As Variant
Application.StatusBar = "Even geduld aub ..."
Dim wsM As Worksheet
Dim dtDelay As Date
dtDelay = Now
Dim File As Integer
Dim isPresent As Boolean
Dim rng As Range
Dim TextOfLine As String, myArr()
Dim vFile As String
Dim i As Integer
tPath = TrailingSlash(tPath)
vFile = Dir(tPath & tName)
i = 0
If vFile <> "" Then
Do
TextOfLine = Left(vFile, InStr(1, vFile, "-Houtrot") - 1)
If LCase(TextOfLine) <> "sjabloon" Then
i = i + 1
ReDim Preserve myArr(1 To i)
myArr(i) = TextOfLine
End If
vFile = Dir()
Loop While vFile <> ""
End If
Application.StatusBar = False
If i = 0 Then i = i + 1: ReDim myArr(1 To i): myArr(i) = "geen Project Logbestanden aanwezig"
GetProjectlogBestanden = IIf(i <> 0, myArr, vbNullString)
End Function

Public Function GetProjectlogBestanden2(tPath As String, tName As Variant) As Variant
Application.StatusBar = "Even geduld aub ..."
Dim wsM As Worksheet
Dim dtDelay As Date
dtDelay = Now
Dim File As Integer
Dim isPresent As Boolean
Dim rng As Range
Dim TextOfLine As String, myArr()
Dim vFile As String
Dim i As Integer
If FileExists(Environ$("TEMP") & "\tempfilelist.lst") = True Then Kill Environ$("TEMP") & "\tempfilelist.lst"
Call Shell("cmd /C dir """ & Replace(tPath & "\" & tName, "\\", "\") & """ /B > " & Environ$("TEMP") & "\tempfilelist.lst", vbMinimizedNoFocus)
WaitForIt:
Application.Wait dtDelay + TimeSerial(0, 0, 2)
If FileExists(Environ$("TEMP") & "\tempfilelist.lst") = False Then GoTo WaitForIt

File = FreeFile
Open Environ$("TEMP") & "\tempfilelist.lst" For Input As File
i = 0
While Not EOF(File)
Line Input #File, TextOfLine
TextOfLine = Left(TextOfLine, InStr(1, TextOfLine, "-Houtrot") - 1)
If LCase(TextOfLine) <> "sjabloon" Then
i = i + 1
ReDim Preserve myArr(1 To i)
myArr(i) = TextOfLine
End If
Wend
Close File
Kill Environ$("TEMP") & "\tempfilelist.lst"
Application.StatusBar = False
If i = 0 Then i = i + 1: ReDim myArr(1 To i): myArr(i) = "geen Project Logbestanden aanwezig"
GetProjectlogBestanden2 = IIf(i <> 0, myArr, vbNullString)
End Function
Both Functions return an Array if files are found