+ Reply to Thread
Results 1 to 3 of 3

Error Saving Protected Workbook

  1. #1
    Registered User
    Join Date
    06-30-2010
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    2

    Error Saving Protected Workbook

    I would like to protect the VBA code in an Excel 2003 workbook. When I set the VBAProject Properties, Lock Project (yes), and enter passwords, I can save the file.

    When I reopen the file, it is protected but I cannot save the file again. I receive an error message:

    "You cannot save to the file format when the VBA project is protected. You may unprotect the VBA project by choosing the Properties command on the Visual Basic Editor's Tools menu, and entering the password for the active project."

    When I follow the instructions to "unprotect" the file, it still will not save ("Document Not Saved"), nor can I perform a "File Save As" under a new name. The file is not a read-only file.

    My goal is to protect the VBA code from the user, but allow the user to save a copy of the file when they make changes to the spreadsheets.

    Am I doing something wrong?

    Thanks in advance for the help.

    Susan

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Error Saving Protected Workbook

    Protecting the VBA Project should not affect saving the workbook. Can you attach the workbook?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-30-2010
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Error Saving Protected Workbook

    Here is a pared down version of the file. I have stripped out any confidential information, but the problem is the same. All passwords are set to sdforson (worksheet protection and VB protection, the workbook itself is not protected).

    SPORT Sample.xls is the file before I password protect and lock the VB Project Properties. I tried to replicate this problem with a new, smaller sample file, but was unsuccessful (the file saved and closed properly after setting the protection).

    SPORT Sampe2.xls is the file after I password protcted and locked the VB Project Properties. At this point it will save initially, but not after the file has been reopened unless I remove protection. I noticed that earlier I was using the password to view the VB but not actually removing the protection.

    Please let me know if you see anything unusual about this file that might cause this. We have had a number of problems with Excel 2003 because our company is converting over to Excel 2007 and is continually deploying patches which sometimes breaks things in Excel 2003. This could be one of them. I appreciate the feed back.

    Susan
    Attached Files Attached Files

+ 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