Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Excel 2007 "Project Locked" "Project is unviewable"

Posted on 2010-01-12
13
Medium Priority
?
11,343 Views
Last Modified: 2012-05-08
I have a big spreadsheet with lots of VBA code attached to buttons.  Suddenly I can't view my VBA source.

The workbook is not protected.
The workbook is not shared.
The workbook is digitally signed by me, cert installed, expires in 2039.
The workbook is located in a 'Trusted Location', my local disk.

I have backup copies from each month, and older ones I can open and view VBA just fine.

I've googled and tried all suggestions.  Again not protected, not shared, not in use, not locked, not password protected.  Any ideas?
0
Comment
Question by:SirParadox
  • 5
  • 5
  • 2
  • +1
13 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 26297534
Hello SirParadox,

Check int he VBE, (alt + F11) | Tools | VBA Project Properties | Protection ... is the lock project for viewing checked ... uncheck it if so.

Regards,

chris_bottomley
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 26297575
SirParadox,

That however does assume that if it is checked that you have some idea of the password - but it either points to the problem or removes another aspect from consideration.

chris_bottomley
0
 
LVL 1

Author Comment

by:SirParadox
ID: 26297606
Tools -> VBA Project Properties

Also pops the same "Project Locked" "Project is unviewable" msgbox. :(

If there is a password I can guess it but I'm never prompted for one.  Nor do any settings hint it's protected.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 26297933
Has the workbook been opened and saved in different versions of Excel?
0
 
LVL 1

Author Comment

by:SirParadox
ID: 26297971
Always been in 2007.  I tried opening it, then saving a new file.  No joy.

The only major change was it was opened under Windows 7, and saved.  
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 26298195
If you do the same thing with (a copy of) one of the backup copies, does the same problem arise?
0
 
LVL 1

Author Comment

by:SirParadox
ID: 26298317
If I save a copy of the current.  Close.  Open.  It's locked.

If I open an older backup copy it's ok.

Now.. your idea.
Take a backup that works.  File -> Save -> filename2.xlsm
 I get an error "The document was saved successfully, but Excel cannot re-open it because of a sharing violation.  Please close the document and try to open it again."

I Re-open the file.  I can view the VBA.  Upon closing it asks me to save changes.  
I agree.  I re-open.  I can still see the VBA.


0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 26298393
Curious thing about the sharing violation message. If you save your current copy as an xlsb format rather than xlsm, can you view the project?
0
 
LVL 1

Author Comment

by:SirParadox
ID: 26298567
Saving the broken copy as Binary.  Re-open.  No luck.
Saving a backup copy as Binary.  No sharing violation.  And yes I can still see the vba code.

This is one heck of a weird scenario.  My poor excel file :(
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 1000 total points
ID: 26298667
It does sound as though something has gone awry inside the compressed file that leads Excel to believe there is some sort of sharing going on. That could explain both the violation message and the inability to view the project. As to why it has occurred, I couldn't say - do you clean out the code regularly when developing?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 26298722
Can you remove the data and post the workbook so I can take a look?
0
 
LVL 1

Accepted Solution

by:
SirParadox earned 0 total points
ID: 26300215
Ok I fixed my document.  Here's what I did.

I went to the Trust Center.  I clicked Document Inspector.  It warned a few tasks were unable to be completed as the document was 'Shared'.

I then went to the Share Workbook section and toggled the Allow Changes box to yes.  I then toggled it to No.  It warned it would remove information.  I said yes.

All is well now.

How's that for fun!
0
 

Expert Comment

by:htiaz
ID: 36343573
SirParadox:
Just ran across the same problem as you had. Great solution! It worked for me also!!

Jay Dishong, PhD
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question