允许我的网络中的受信任位置

时间:2016-11-23 08:21:11

标签: excel vba vbscript

我尝试允许信任位置本地网络中的 Excel 进行重新设置但是当我运行它时出现编译错误< / p>

Public Function AllowNetworkLocations()
Dim strLnKey As String
Dim reg As Object

Set reg = CreateObject("wscript.shell")
strLnKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security\Trusted Locations\AllowNetworkLocations"
reg.RegWrite strLnKey, 1, "REG_DWORD"
End Function

enter image description here

0 个答案:

没有答案