를 사용하여 경로를 가져올 때 오류를 얻기, 나는 다음과 같은 매크로 코드를 건너 왔어요 파일을 닫은 다음 다시 엽니 다. 이 오류는 도구 매크로 라이브러리 내에서 다음 함수의 마지막 줄에 생성되는LibreOffice와 캘크 셀에 파일의 현재 경로를 얻기에 해결책을 온라인으로 검색 한 후 매크로
Inadmissible value or data type.
Index out of defined range.
: 나는 그것을 다시 열 때, 나는 다음과 같은 오류 메시지가 나타납니다. 이 파일로드시 오류가 발생하지만 그 이후 작업을 계속하는 이유
Function FileNameoutofPath(ByVal Path as String, Optional Separator as String) as String
Dim i as Integer
Dim SepList() as String
If IsMissing(Separator) Then
Path = ConvertFromUrl(Path)
Separator = GetPathSeparator()
End If
SepList() = ArrayoutofString(Path, Separator,i)
FileNameoutofPath = SepList(i)
End Function
그 함수의 코드는 ...
Function ArrayOutOfString(BigString, Separator as String, Optional MaxIndex as Integer)
Dim LocList() as String
LocList=Split(BigString,Separator)
If not isMissing(MaxIndex) then maxIndex=ubound(LocList())
ArrayOutOfString=LocList
End Function
는 잘 모르겠어요.
아이디어가 있으십니까? 감사.
경우'ArrayoutofString'의 코드는? –
그 기능에 대한 코드를 원래 게시물 –
에 추가했습니다. 디버그 한 다음 'SepList()'에 내용이 있습니까? 오류가있을 때'i'의 값은 무엇입니까? –