PDA

View Full Version : VBA to ZIP and password protect individual folder in the path.



shiva_reshs
09-26-2018, 01:14 AM
Hello,
I have excel file with Folder name. I need help with VBA to ZIP it with password specified against each folder name.

Example

Folder Name Password
Folder A 123
folder b 456
folder C 789

Please advise.

gmayor
09-26-2018, 01:38 AM
See https://www.rondebruin.nl/win/s7/win001.htm and https://www.rondebruin.nl/win/s7/win003.htm

shiva_reshs
09-26-2018, 01:57 AM
Hi,

This is using .7Z. I have winrar. As well my requirement is to ZIP each folder of the path with password of each which is different then one other

gmayor
09-26-2018, 06:53 AM
I am pretty certain that WinRar is not VBA capable,

Kenneth Hobs
09-26-2018, 07:23 AM
Use the command line option -p to add a password. Use Shell() in VBA to execute your command line. Figure out what your command line should be by Win+R or Win > cmd > Enter.

It is unclear if the folders are to be contained in one zip or rar file or each separate.

shiva_reshs
09-26-2018, 08:42 PM
separate folder. Lets say my path has 10 folder, then 10 zip.