问题描述
我的代码似乎有一个晚上出现的问题。这有一些特殊之处,所以我会尝试尽可能多的细节。
I have a problem with my code which seems to have cropped up over night. There are some peculiarities with this so I'll try to give as much detail as I can.
该文件是一个excel工作簿,它从数据生成一个xml文件通过一个宏打开,填充并保存文件,本节运行正常。
The file in question is an excel workbook which generates an xml file from data passed in. The file is opened, populated and saved via a macro, and this section runs fine.
在此例程中创建.xml的GUID时,会出现此问题:
The problem occurs when creating a GUID for the .xml, in this routine:
Function GenGUID() As String
Dim strGUID As String
Dim TypeLib As Object
Set TypeLib = CreateObject("Scriptlet.TypeLib")
strGUID = TypeLib.guid
'dump the curly brackets
strGUID = Replace(strGUID, "{", "")
strGUID = Replace(strGUID, "}", "")
strGUID = Left(strGUID, Len(strGUID) - 2)
GenGUID = strGUID
End Function
具体来说,行:
Set TypeLib = CreateObject("Scriptlet.TypeLib")
这会抛出一个运行时错误70:权限被拒绝。
This throws up a "Runtime error 70: Permission Denied".
现在,这个特性。
- 在4台机器中,文件被尝试,它在其中一个工作。
- 工作机器的用户尝试在其他3台机器上运行该文件无效
- 在3台破碎机器中,有2台安装了一夜之间的更新,另外两台机器在几天内没有安装更新。
- 管理员帐户已尝试运行该文件以排除过夜权限更新。
- 这个文件在破碎的机器上昨天(2017年7月12日)运行良好。
- 所有参考库已经被检查,并与工作机器匹配。 li>
- 在所有4台机器上使用的Excel版本为2013 Pro。
- Out of 4 machines the file was tried on, it works on one of them.
- The user of the 'working' machine has tried running the file on the other 3 machines to no avail.
- Of the 3 'broken' machines, 2 had updates installed overnight and the other hadn't had updates installed in a few days. The 'working' machine hasn't had updates installed since February.
- The administrator account has tried running the file to rule out an overnight permissions update.
- The file ran fine yesterday (12th Jul 2017) on one of the 'broken' machines.
- All reference libraries have been checked and they match with the 'working' machine.
- The Excel version in use on all 4 machines is 2013 Pro.
更新问题。但是,昨天的文件运行良好的机器是破碎的机器没有更新一夜之间,排除了这一点。
The stand out above is the updates issue. But, the machine the file ran fine on yesterday was the 'broken' machine not updated overnight, ruling this out.
我们已经尝试了我们可以想到的一切,很多互联网拖网捕鱼的答案。所有人都没有想到。
We have tried everything we can think of, along with a lot of internet trawling for answers. All coming up with nothing.
有没有人有任何想法?
提前感谢任何帮助。 / p>
Thanks in advance for any help.
推荐答案
我们今天早上遇到这个问题。
We ran into this problem this morning too.
删除Windows更新KB3213624。这解决了错误。
Delete Windows update KB3213624. That solved the error.
这篇关于VBA'set typelib = createobject(“scriptlet.typelib”)“权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!