Я пытаюсь открыть файл с именем файла Unicode для двоичного доступа, чтобы вычислить контрольную сумму MD5.У меня правильно указаны имена файлов и путь в листе Excel.
Используемые имена файлов :
![File Names Used](https://i.stack.imgur.com/3elVg.jpg)
В этом случае код завершается с ошибкой Open sPath For Binary Access Read As lngFileNumber
с 'Run-Time error'52': Bad file name or number
Function GetFileBytes(ByVal sPath As String) As Byte()
' makes byte array from file
Dim lngFileNum As Long, bytRtnVal() As Byte, bTest
lngFileNum = FreeFile
If LenB(Dir(sPath)) Then ''// Does file exist?
Open sPath For Binary Access Read As lngFileNum
'a zero length file content will give error 9 here
ReDim bytRtnVal(0 To LOF(lngFileNum) - 1&) As Byte
Get lngFileNum, , bytRtnVal
Close lngFileNum
Else
Err.Raise 53 'File not found
End If
GetFileBytes = bytRtnVal
Erase bytRtnVal
End Function
Есть предложения?