+ Reply to Thread
Results 1 to 2 of 2

ActiveWorkbook.Unprotect (prompt for password)

  1. #1
    Registered User
    Join Date
    08-19-2004
    Posts
    60

    ActiveWorkbook.Unprotect (prompt for password)

    Hi all,

    i have a workbook and i want to run a macro to unprotect the workbook by prompting for a password first.

    Now if i want to prompt the user for a password and then unprotect the SHEET then using the following is fine:

    Please Login or Register  to view this content.
    However when i use:

    Please Login or Register  to view this content.
    i get an runtime error that the password supplied is incorrect (even though i haven't supplied one).

    Does anyone know how to get a password prompt there?

    Thanks

    James

  2. #2
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    Hi jamesryan,

    The code to unprotect a passworded sheet is as following:

    Please Login or Register  to view this content.
    to prompt for the user to enter a password you can do this:

    Please Login or Register  to view this content.
    There are only 10 types of people in the world:
    Those who understand binary, and those who don't!

+ 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