最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

excel - shell32.dll no longer working to expand zip archive - Stack Overflow

programmeradmin2浏览0评论

I have used this method for many years to expand a Zip archive via VBA:

Sub UnZip(pathZip as Variant, pathOut as Variant)
    Dim oShell As Object
    Const SHELL_DO_NOT_SHOW_PROGRESS = &H4

    Set oShell = CreateObject("Shell.Application")

    oShell.NameSpace(pathOut).CopyHere _
    oShell.NameSpace(pathZip).Items, _
    SHELL_DO_NOT_SHOW_PROGRESS
End Sub

It's recently stopped working, which means nothing is exported from the zip archive and no error is raised.

I noted the version of my copy of shell32.dll is 10.0.26100.3037 and has today's timestamp (10MAR2025).

Has there been a change to security policies to prevent this from working or could this be a Microsoft bug?

UPDATED

Changed declarations back to their original type Variant (without improvement) and changed the CopyHere call to include the &H4 vOption 'Do not display a progress dialog box.' from Microsoft Learn.

Now the Shell object is returning errors for every file in the archive:

发布评论

评论列表(0)

  1. 暂无评论