Closed MaheshPMane closed 2 years ago
Make sure to set Conditional Compilation in Make tab in project's properties dialog to include ZIP_CRYPTO = 1
setting for crypto support to get compiled from sources. By default crypto support is not compiled to reduce footprint on the final executable size.
Your code should work ok but here is another minimal sample code with error checking
With New cZipArchive
If Not .OpenArchive("c:\temp\crdata.zip") Then
Debug.Print .LastError
End If
If Not .Extract("c:\temp", Password:="1111") Then
Debug.Print .LastError
End If
End With
Note that if the password you supply is not correct then Extract
will fail with an error message in LastError
property.
If after setting ZIP_CRYPTO
conditional compilation constant this is still not working can you provide (here in this thread) a password protected .zip file you are having troubles extracting from?
Hello Sir,
It works, Thank You
Hi Please check and guide me on below code
With m_oZip .OpenArchive "c:\temp\crdata.zip" Set m_oExtractInMemory = m_oZip bResult = .Extract("c:\temp\", , "1111") Set m_oExtractInMemory = Nothing sLastError = .LastError End With