Hello
I have used the code at this link by PSUIVERSON posted below:
I was able to password protect the files within the zip, but when trying to unlock those files in the zip, I found that it has applied password instead of JORDAN as the password to lock down the files.
In my project, this piece of script was added to the VBA to encrypt different zip files each with its own password, but even if I change JORDAN to a different variable String (input password from a column in a worksheet) like scripted below, the code does not take the password I provide instead the default word password.
Am I missing something? Anyone please help. Thanks.
I have used the code at this link by PSUIVERSON posted below:
Code:
Dim source As String
Dim target As String
Dim password As String
source = Chr$(34) & "C:\DEPTS\050\" & Chr$(34)
target = Chr$(34) & "C:\DEPTS\050\050" & Chr$(34)
password = Chr$(34) & "JORDAN" & Chr$(34)
Shell ("C:\Program Files\WinZip\WINZIP32.EXE -min -a -sPASSWORD " & target & " " & source)
End Function
I was able to password protect the files within the zip, but when trying to unlock those files in the zip, I found that it has applied password instead of JORDAN as the password to lock down the files.
In my project, this piece of script was added to the VBA to encrypt different zip files each with its own password, but even if I change JORDAN to a different variable String (input password from a column in a worksheet) like scripted below, the code does not take the password I provide instead the default word password.
Code:
Dim source As String
Dim target As String
Dim password As String
Dim pwd As String
'within loop x is the row number
pwd = Trim(Records.Cells(x, 6).Text)
source = Chr$(34) & "C:\DEPTS\050\" & Chr$(34)
target = Chr$(34) & "C:\DEPTS\050\050" & Chr$(34)
password = Chr$(34) & pwd & Chr$(34)
Shell ("C:\Program Files\WinZip\WINZIP32.EXE -min -a -spassword " & target & " " & source)
Am I missing something? Anyone please help. Thanks.