运行时错误52,错误的文件名或编号 [英] Run-time Error 52, Bad file name or number

查看:2166
本文介绍了运行时错误52,错误的文件名或编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Excel宏在Windows 10中联系SharePoint文件夹时出现问题。

我有一个模型已经在Windows 7下运行了好几年没有问题。当我迁移到Windows 10时,在SharePoint上查找文件夹的宏部分不再有效。我尝试了相同的宏,但在我的笔记本电脑上引用了一个本地文件,没有问题。

当我运行调试时,它突出显示以下行:


如果Len(Dir(vSource& vFile))= 0那么


Problem with Excel Macro contacting a SharePoint folder in Windows 10.
I have a model that has been running under Windows 7 for several years without a problem. When i migrated to Windows 10 the part of the macro that is looking for a folder on SharePoint no longer works. I have tried the same macro but referencing a local file on my laptop and there is no problem.
When I ran the debug it highlights the line for:

If Len (Dir(vSource & vFile) ) = 0 Then


附加图像
Macroserror.PNG (159.6 KB,47 views)
Attached Images
Macroserror.PNG (159.6 KB, 47 views)

推荐答案

你替换了你的系统(从Windows7到Windows 10),你没有改变任何东西到Excel中的宏,我t给出错误。


选项1:您没有足够的权限(在Windows 10下)访问此SharePoint文件夹。


选项2 :在Windows 10下安装Excel时缺少某些东西。


为了解决这个问题,需要提供更多信息,而不是图片和您在此消息主题中给出的描述。 />

变量''vSource''和''vFile''有哪些值?他们是否指向SharePoint中的正确目的地?


阅读错误52 ,不清楚这是否与您的问题有关。
Your replaced your system (from Windows7 to Windows 10), you did not change anything to the macro in Excel, and it gives an error.

Option 1: You have not enough right (under windows 10) to access this SharePoint folder.

Option 2: Something is missing to your installation of Excel under Windows 10.

For this to solve more info is needed than a picture and the description you gave in the subject of this message.

What values do the variables ''vSource'' and ''vFile'' have? Do they point to a correct destination in SharePoint?

When reading Error 52 on the site of Microsoft, its unclear if this is related to your problem.


Luuk,您的链接指向系统级别错误

这是指向
VBA运行时错误52

Luuk, your link points to the system level error
This is the link to
VBA Runtime Error 52


变量''vSource''和''vFile''有哪些值?他们是否指向SharePoint中的正确目的地?
What values do the variables ''vSource'' and ''vFile'' have? Do they point to a correct destination in SharePoint?



确切地说,这是你的第一个故障排除步骤。

放置一些 Debug.print 和< ctrl>< g>看看这两个字符串是如何解析的。

Exactly, this is your first trouble shooting step.
Place a few Debug.print and <ctrl><g> to see how these two strings are resolving.


@zmdb:我像'adanvilla10'一样'懒惰',然后确实停止阅读''错误52''


错误的文件名或号码之后的文字会(或应该)让铃声响起。


@ adanvilla10:快乐调试!
@zmdb: I was ''as-lazy-as'' @adanvilla10,
and did stop reading after ''Error 52''

The text after this ''Bad file name or number'' would (or should) have made bells ringing.

@adanvilla10: Happy debugging!


这篇关于运行时错误52,错误的文件名或编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆