+ Reply to Thread
Results 1 to 2 of 2

To unzip password protected zip files using VBA

  1. #1
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    180

    To unzip password protected zip files using VBA

    hii

    I have a bunch of zip/rar files in a folder which are all protected with a different password all known to me.

    I require a VBA code which will allow me to browse & select that folder & extract the file from all zip/rar files using the password specified in column B of the sheet.
    (Column A will contain the name of the zip file to look in the folder)

    Any help on this would be appreciated..

    Thank you.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,438

    Re: To unzip password protected zip files using VBA

    .
    Ron deBruin has examples on his website that will assist.


    Of particular note is a Text File he has included that outlines various WinZip options not commonly known. One option is the PASSWORD. His description :

    "Extracting Files
    ****************

    The command format is:
    winzip32 -e [options] filename[.zip] folder
    where -e is required.
    options
    -o and -j stand for "Overwrite existing files without prompting" and "Junk pathnames", respectively.
    Unless -j is specified, folder information is used. Use -sPassword to specify a case-sensitive password.
    The password can be enclosed in quotes, for example, -s"Secret Password".


    filename.zip
    Specifies the name of the Zip file involved. Be sure to specify the full filename (including the folder).

    folder
    Is the name of the folder to which the files are extracted. If the folder does not exist it is created.
    "

    So, if you wrote the macro to 'loop' through the list you provide and specify the OPTIONS to refer to a variable for
    the password in the list ... you should be able to perform the function you are seeking.

    Look at this resource, POST #4 : https://www.pcreview.co.uk/threads/u...words.3779569/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unzip protected file using VBA
    By msherifam01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2013, 09:00 AM
  2. Web query to CSV files in a password protected directory
    By nunonog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2013, 01:50 PM
  3. Password protected files
    By spenser723 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2010, 09:07 AM
  4. Excel 2007 : Password protected files
    By Tokuno in forum Excel General
    Replies: 2
    Last Post: 06-29-2010, 11:11 AM
  5. open multiple password protected files
    By blackstar in forum Excel General
    Replies: 0
    Last Post: 05-13-2007, 11:56 PM
  6. password protected files
    By jai in forum Excel General
    Replies: 1
    Last Post: 03-21-2006, 09:00 PM
  7. Using Password-protected files for a report
    By pmms in forum Excel General
    Replies: 0
    Last Post: 11-30-2005, 01:00 PM
  8. Opening password protected files
    By Nick S in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2005, 12:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1