|
vba 7z压缩文件程序已经成功运行,可为什么就不能运行下列解压文件的程序呢?
如下:
Dim rarexe As String
Dim source As String
Dim target As String
Dim filestring As String
Dim result As String
rarexe = "C:\Program Files\7-Zip\7z.exe"
source = """C:\Documents and Settings\Administrator\桌面\行列交叉值条件查询\2.zip"""
target = """C:\Documents and Settings\Administrator\桌面\行列交叉值条件查询\2\"""
filestring = rarexe & " x " & source & " " & target
result = Shell(filestring, vbHide)
运行后,什么错误信息也不提示,压缩文件也得不到解压,请高手帮忙看看,这是为什么呢?我也试过用winrar.exe,它可成功进行解压,可换成7z.exe就不可以了呢?不过winrar.exe 也只能解压.rar文件,也不可解压.zip压缩文件,这到底有什么秘诀呢?请高手不吝赐教!谢谢了!
|
|