错误5“Public ReadOnly Property Right() As Integer”没有任何参数,并且无法对它的返回类型进行索引。?
这个判断文件路径末位是不是"\"的代码,应该没错的啊,而且我在同一个项目别的地方也用right函数都没错的.
Public Function SearchFileInPath(ByVal thePath As String, ByVal theFileName As String, Optional ByVal mStop As Boolean = False) As String() If Right(thePath, 1) <> "\" Then thePath = thePath & "\"'这里的Right函数波浪线报错:错误 5 “Public ReadOnly Property Right() As Integer”没有任何参数,并且无法对它的返回类型进行索引。 Call GetFileLoop(thePath, theFileName, mStop) SearchFileInPath = FoundFile End Function