Consulting

Results 1 to 2 of 2

Thread: Help with Password

  1. #1

    Help with Password

    When I run the macro, How do I unprotect the workbook and worksheets automatically , and then protect them again via VBA when the macro has been completely run?


    Can anyone help ?


    To Run the macro:
    1. Save the Template on C:\ as Template1.xls
    2. Click Run on TestMacro.xls
    3. Select SourceFile3.xls to process
    4. File is saved at C:\

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    ActiveWorkbook.Unprotect "password"
    ActiveSheet.Unprotect "password"
    
    Rem your code
    
    ActiveSheet.Protect "password"
    ActiveWorkbook.Protect "password"

Posting Permissions

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