VBA:安全通道支持发生错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44045305/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-12 12:36:49  来源:igfitidea点击:

VBA: An error occurred in the secure channel support

vba

提问by David912

I have a code in VBA that worked perfectly for a long time. Suddenly it stopped working for no reason. Nothing has changed on my side.

我在 VBA 中有一段代码,它可以完美运行很长时间。突然它无缘无故地停止工作。我这边什么都没有改变。

I use it to download web pages and store them in strings like this:

我用它来下载网页并将它们存储在这样的字符串中:

Function something() As String
URL = "www..."
Set XMLHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
XMLHTTP.Open "GET", URL, False
XMLHTTP.send
something = XMLHTTP.responseText
End Function

at XMLHTTP.send I get the following error: Run-time error '-2147012739 (80072f7d)': An error occurred in the secure channel support

在 XMLHTTP.send 我收到以下错误: 运行时错误“-2147012739(80072f7d)”:安全通道支持中发生错误

Whats is the meaning of this error and what can be done?

这个错误的含义是什么,可以做什么?

I tried reading about it but it seems that its a generic error and could be many things. Perhaps Microsoft changed some protocols or something similar?

我试着阅读它,但它似乎是一个通用错误,可能有很多东西。也许微软改变了一些协议或类似的东西?

回答by KarlH7

I had this same error: 6/30/2018

我有同样的错误:6/30/2018

I'm running Excel on windows 7,

我在 Windows 7 上运行 Excel,

On a Mac, In Parallels.

在 Mac 上,在 Parallels 中。

This was a very simple fix.

这是一个非常简单的修复。

Goto Control Panel,

转到控制面板,

Click Network and Internet,

单击网络和 Internet,

Click Network and Sharing Center, (at the Bottom Left CLICK Internet Options)

单击网络和共享中心,(在左下角单击 Internet 选项)

Internet Properties Dialog Box will come up, Click the Advanced Tab

将出现 Internet 属性对话框,单击高级选项卡

Scroll to bottom and turn on "Use TLS1.2" (Mine was already Set Prior to receiving the Error) Click Apply

滚动到底部并打开“使用 TLS1.2”(我的在收到错误之前已经设置)单击应用

Here is the link to the downloads need for the proper Windows OS Update file: http://www.catalog.update.microsoft.com/search.aspx?q=kb3140245

这是正确的 Windows 操作系统更新文件所需的下载链接:http: //www.catalog.update.microsoft.com/search.aspx?q=kb3140245

I downloaded and Installed the UpDate from Windows Explorer (File Manager) Restarted Windows

我从 Windows 资源管理器(文件管理器)下载并安装了 UpDate 重新启动了 Windows

and ran the VBA. It ran perfectly

并运行 VBA。它完美运行

Thanks to Srinath Gudimetla see his link is below for full details: https://www.linkedin.com/pulse/working-vba-tls-protocol-srinath-gudimetla

感谢 Srinath Gudimetla,请参阅下面的链接以获取完整详细信息:https://www.linkedin.com/pulse/working-vba-tls-protocol-srinath-gudimetla