VBA 解压缩受密码保护的 ZIP 文件

时间:2021-07-20 14:50:14

标签: excel vba zip

我有以下 VBA 代码来解压缩文件,它运行良好。但是我收到了一个受密码保护的 ZIP 文件,我想打开它(我得到了密码):

Sub UnzipAFile(zippedFileFullName As Variant, unzipToPath As Variant)
Dim ShellApp As Object
Set ShellApp = CreateObject("Shell.Application")
ShellApp.Namespace(unzipToPath).CopyHere ShellApp.Namespace(zippedFileFullName).items
MsgBox ("Unzipped File")
End Sub

我在我的主要方法中使用了一个调用函数:

Call UnzipAFile("C:\path\Videos\windows.zip", "C:\path\Videos\")

如何在我的代码中实现密码?

感谢您抽出宝贵时间。

0 个答案:

没有答案
相关问题