?
Solved

Excel 2007 "Project Locked" "Project is unviewable"

Posted on 2010-01-12
13
Medium Priority
?
9,586 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

762 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