+ Reply to Thread
Results 1 to 7 of 7

Password protect a zipped file

  1. #1
    Registered User
    Join Date
    12-06-2019
    Location
    Romania
    MS-Off Ver
    2016
    Posts
    22

    Password protect a zipped file

    Hello, i am trying generating a few pdf's from a workbook, and i want to zip and password each file individually.
    The code below works, but when i repeat the code multiple times it does not password protect all the zip files.
    Any ideas why ? do i somehow need to reset zip parameters after each item ?

    Please Login or Register  to view this content.
    Thank you

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Password protect a zipped file

    Try to use Wscript.Shell
    Set WshShell = CreateObject("WScript.Shell")

    RetCode = WshShell.Run(strCommand, 0, True)
    Last edited by Glenn Kennedy; 01-05-2021 at 11:06 AM. Reason: awaiting OP to declare cross-post

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,900

    Re: Password protect a zipped file

    Welcome (back) to the forum.

    Thanks for your question. However, we have just found out that you have posted the same question elsewhere.... and haven't told us. Feel free to cross-post on other sites...

    But. Every forum has its rules. Please see Forum Rule #3 about cross-posting. So.

    Do not keep it a secret. We all are willing to give you our time, freely. However, some of us get annoyed if we waste our time developing a solution for you, when you already have a nice solution elsewhere. All we ask is that you show us some respect and tell us:

    1) if you have cross-posted, and

    2) the URL of the cross posts.

    That way, those of us who don't want to waste their time can quickly check to see if you're already happy with another solution.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    12-06-2019
    Location
    Romania
    MS-Off Ver
    2016
    Posts
    22

    Re: Password protect a zipped file

    Hello,

    Yes apparently i did cross post, did not know about the rule, i apologize.
    Link to the other post: https://www.mrexcel.com/board/thread...issue.1157591/

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,900

    Re: Password protect a zipped file

    Cheers. Possible solution restored.

  6. #6
    Registered User
    Join Date
    12-06-2019
    Location
    Romania
    MS-Off Ver
    2016
    Posts
    22

    Re: Password protect a zipped file

    Quote Originally Posted by BMV View Post
    Try to use Wscript.Shell
    Set WshShell = CreateObject("WScript.Shell")

    RetCode = WshShell.Run(strCommand, 0, True)
    Hy, could you please show me in my code where i need to place your lines ?

    thank you.

  7. #7
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Password protect a zipped file

    Please Login or Register  to view this content.

+ 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. [SOLVED] Password Protect a PowerPoint File
    By Bobbbo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2017, 05:36 PM
  2. Password protect a BAS File
    By tek9step in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2010, 10:24 AM
  3. [SOLVED] Password protect an excel file?
    By in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2009, 10:53 AM
  4. Password protect cells but not the file
    By sdubose99 in forum Excel General
    Replies: 3
    Last Post: 10-14-2005, 01:12 AM
  5. [SOLVED] Password Protect CSV File
    By Jasmine in forum Excel General
    Replies: 3
    Last Post: 09-21-2005, 12:05 PM
  6. [SOLVED] [SOLVED] password protect .csv file
    By Jennifer Boe in forum Excel General
    Replies: 1
    Last Post: 06-01-2005, 01:05 PM
  7. [SOLVED] can we password protect a .csv file?
    By Lakshmi in forum Excel General
    Replies: 1
    Last Post: 01-04-2005, 05:06 PM

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