本文介绍了用7zip解压缩麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 创建一个短宏来解压缩一些文件,并在按下命令按钮后启动一个时钟。我在网络上,有一些限制,但我确实拥有此计算机和网络文件夹的管理员权限。问题是,它在电子表格中表现良好,或者当它逐步完成时,但它不会解压缩我的文件。任何想法? 子启动() CommandButton3_Click 结束子 Private Sub CommandButton3_Click() Const SZP As String =(7z.exe) Dim Cmd $ Dim Pth As String Pth = Application.ActiveWorkbook.Path& \ Cmd $ = Pth& SZP& e& (Myfiles.zip)& -o& Pth '错误继续下一步 Shell(Cmd $) 范围(D4)。值=现在 Sheets(Q1)。选择 范围(a1)。选择 End Sub Sub Stp() CommandButton4_Click End Sub Private Sub CommandButton4_Click() 范围(D5)。值=现在 结束次级 我尝试过: 我已经尝试了我能想到的一切。 提前致谢 Bob WilliamsCreated a short macro to unzip some files, and start a clock after a commandbutton is pressed. I am on a network, with some restrictions, but I do have admin rights to both this computer and the network folder. Problem is, it acts ok in the spreadsheet or when it's stepped through, but it does not unzip my files. Any ideas?Sub Start() CommandButton3_ClickEnd SubPrivate Sub CommandButton3_Click() Const SZP As String = ("7z.exe") Dim Cmd$ Dim Pth As String Pth = Application.ActiveWorkbook.Path & "\" Cmd$ = Pth & SZP & " e " & ("Myfiles.zip") & " -o " & Pth 'On Error Resume Next Shell (Cmd$) Range("D4").Value = Now Sheets("Q1").Select Range("a1").SelectEnd SubSub Stp() CommandButton4_ClickEnd SubPrivate Sub CommandButton4_Click() Range("D5").Value = NowEnd SubWhat I have tried:I've tried just about everything I can think of.Thanks in advanceBob Williams推荐答案 Dim Pth As String Pth = Application.ActiveWorkbook.Path& \ Cmd Dim Pth As String Pth = Application.ActiveWorkbook.Path & "\" Cmd = Pth& SZP& e& (Myfiles.zip)& -o& Pth '错误继续下一步 Shell(Cmd= Pth & SZP & " e " & ("Myfiles.zip") & " -o " & Pth 'On Error Resume Next Shell (Cmd) 范围(D4 ).Value =现在 表格(Q1)。选择 范围(a1)。选择 End Sub Sub Stp() CommandButton4_Click End Sub Private Sub CommandButton4_Click() 范围(D5)。价值=现在 结束子 我尝试过: 我已经尝试了我能想到的一切。 提前谢谢 Bob Williams) Range("D4").Value = Now Sheets("Q1").Select Range("a1").SelectEnd SubSub Stp() CommandButton4_ClickEnd SubPrivate Sub CommandButton4_Click() Range("D5").Value = NowEnd SubWhat I have tried:I've tried just about everything I can think of.Thanks in advanceBob Williams 这篇关于用7zip解压缩麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 13:53