Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel VBA验证sharepoint位置是否存在文件_Excel_Vba_Sharepoint - Fatal编程技术网

Excel VBA验证sharepoint位置是否存在文件

Excel VBA验证sharepoint位置是否存在文件,excel,vba,sharepoint,Excel,Vba,Sharepoint,我正在寻找一个VBA来识别文件是否存在。我找到了一个函数,只要我将它指向“c:/”位置,它就可以为我工作,但是当我使用以下函数时,路径指向一个网站(sharepoint),这导致宏不再工作 s = ThisWorkbook.Path 上面的结果是以下路径名 http://.... sharepoint.com/personal//file.xlsx 因此,我总是得到一个错误,即该文件不存在,尽管它应该存在 If IsFile(s) Then MsgBox "yes"

我正在寻找一个VBA来识别文件是否存在。我找到了一个函数,只要我将它指向“c:/”位置,它就可以为我工作,但是当我使用以下函数时,路径指向一个网站(sharepoint),这导致宏不再工作

 s = ThisWorkbook.Path 
上面的结果是以下路径名

http://.... sharepoint.com/personal//file.xlsx

因此,我总是得到一个错误,即该文件不存在,尽管它应该存在

If IsFile(s) Then
MsgBox "yes"

Else
MsgBox "no"
End If
我正在使用以下函数:

Public Function IsFile(s)
IsFile = CreateObject("Scripting.FileSystemObject").FileExists(s)
End Function
有人知道为什么不能在此宏中使用my Thisworkbook.Path吗