H
Hari
Hi,
I want to open some Zipped files through VBA (Excel) and then unzip them to
my target folder.
I got ready made stuff for me from Ron de Bruin's site
http://www.rondebruin.nl/unzip.htm#zip
But the problem is ....I have Windows XP and probably zipping is integrated
in to XP so for me
the statement "Pathwinzip = .." doesnt make sense. Also, within ShellStr it
did not make sense to me
to include pathname so, I modified the above code to the following...
Sub UnZip_ZipFile_1change()
Dim PathWinZip As String, FileNameZip As String
Dim ShellStr As String, FolderName As String
FileNameZip = "C:\Documents and Settings\abc\Desktop\DEV1_1022.zip"
FolderName = "C:\Documents and Settings\abc\Desktop\Unzipped data"
ShellStr = FileNameZip & Chr(34) _
& " " & Chr(34) & FolderName & Chr(34)
ShellAndWait ShellStr, vbHide
MsgBox "Look in " & FolderName & " for extracted files"
End Sub
But by doing that, VBA displays an error "Run-time error '53': File not
found" when it is processing "hProg = shell(PathName, WindowState)" within
Public Sub ShellAndWait .
(I didnt want to make the mail very big, so didnt paste Ron's actual code
here. If that is not a correct practice please tell me so and in future I
would paste the 'source-code' as well)
I want to open some Zipped files through VBA (Excel) and then unzip them to
my target folder.
I got ready made stuff for me from Ron de Bruin's site
http://www.rondebruin.nl/unzip.htm#zip
But the problem is ....I have Windows XP and probably zipping is integrated
in to XP so for me
the statement "Pathwinzip = .." doesnt make sense. Also, within ShellStr it
did not make sense to me
to include pathname so, I modified the above code to the following...
Sub UnZip_ZipFile_1change()
Dim PathWinZip As String, FileNameZip As String
Dim ShellStr As String, FolderName As String
FileNameZip = "C:\Documents and Settings\abc\Desktop\DEV1_1022.zip"
FolderName = "C:\Documents and Settings\abc\Desktop\Unzipped data"
ShellStr = FileNameZip & Chr(34) _
& " " & Chr(34) & FolderName & Chr(34)
ShellAndWait ShellStr, vbHide
MsgBox "Look in " & FolderName & " for extracted files"
End Sub
But by doing that, VBA displays an error "Run-time error '53': File not
found" when it is processing "hProg = shell(PathName, WindowState)" within
Public Sub ShellAndWait .
(I didnt want to make the mail very big, so didnt paste Ron's actual code
here. If that is not a correct practice please tell me so and in future I
would paste the 'source-code' as well)