+ Reply to Thread
Results 1 to 2 of 2

Password-protect excel files in folder

  1. #1
    Registered User
    Join Date
    12-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    39

    Talking Password-protect excel files in folder

    Hi,

    I'm hoping someone can help. I'm trying to build a quick tool that displays a list of all Excel files from a given folder and then password-protect each one.

    So far, I've managed to do this:

    1) Look for all Excel files in a given folder and display their names in Column B (i.e. from Cell B9 down).
    2) Generate a password in Column C (i.e. from Cell C9 down) automatically based on the filename - I've built this in to the macro I built in step 1.


    And now I've hit a snag. I now want to loop through each file from the list in Column B (from B9 down) and assign the corresponding password to it from Column C (from C9 down). I wrote the following code for it, but it doesn't seem to work:

    ==============================================

    Please Login or Register  to view this content.
    ==============================================


    Any ideas??


    Thanks in advance!
    Last edited by FDibbins; 12-10-2014 at 01:00 PM.

  2. #2
    Registered User
    Join Date
    12-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    39

    Re: Password-protect excel files in folder

    When I run the above code, it gives me an error message to the effect of, 'the folder 'Test' is read-only and cannot be opened'.

    I've tried setting the folder to vbNormal using SetAttr, but it still comes up with the same error!! Anyone know a way around this?

+ 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. VBA code to password protect all excels files in a folder
    By jaincool123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2014, 07:19 AM
  2. How to Password Protect Word and Excel Files
    By memopadhd7 in forum Tips and Tutorials
    Replies: 0
    Last Post: 02-24-2014, 03:01 AM
  3. [SOLVED] How to password protect a complete folder in excel
    By daisys_dad in forum Excel General
    Replies: 0
    Last Post: 08-10-2006, 09:35 AM
  4. [SOLVED] Password protect Excel and Word FOLDERS (not just files)
    By Hedges Chandler in forum Excel General
    Replies: 1
    Last Post: 11-15-2005, 03:25 PM
  5. [SOLVED] Can you password protect a folder.
    By Shrimp913 in forum Excel General
    Replies: 1
    Last Post: 03-04-2005, 04: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