+ Reply to Thread
Results 1 to 6 of 6

VBA to protect & unprotect workbook

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    VBA to protect & unprotect workbook

    Morning,

    I need to add some code to my macro to unprotect the workbook to run the macro then protect it all again when complete.

    Can anyone advise on the correct code?

    Would it be something like;

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by kenadams378; 12-18-2012 at 07:39 AM.

  2. #2
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: VBA to protect & unprotect workbook

    Please Login or Register  to view this content.
    Last edited by Legend Rubber; 12-10-2012 at 10:29 AM.

  3. #3
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to protect & unprotect workbook

    Is it possible to do this as a work book?

  4. #4
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: VBA to protect & unprotect workbook

    Please Login or Register  to view this content.
    Last edited by Legend Rubber; 12-10-2012 at 10:29 AM.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: VBA to protect & unprotect workbook

    You could also look into the UserInterfaceOnly method.
    HTH
    Regards, Jeff

  6. #6
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to protect & unprotect workbook

    Many thanks for your help

    Much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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