我尝试允许信任位置在本地网络中的 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