Excel VBA Lock up

Shiva

New Member
Joined
Mar 11, 2008
Messages
7
Hi,

I created a budget template file for users to fill in which uses the "xlveryhidden" function on a worksheet that holds the data that will be extracted and rolled-up to get the total company figures. The VBA project for this template was locked with a password.

I have come across a problem whereby I cannot unlock the VBA Project on some of the files and am getting a "Project is unviewable" message and on some files, I cannot run the sheet1.visible = xlsheetvisible code. A run time error with "Method Unprotect of object_worksheet failed message".

Right now, I cannot view the VBA code for a project, and when I can, on some of them, I cannot unhide the worksheet that was hidden using the xlveryhidden property.

Have any of you experienced this issue? I am currently running on Excel 2007 with the files saved as xl 97-2003. I have tried opening the code using MS Excel 2002 and have the same problem.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,

I don't think you can open the codes without entering the password originally used while creating the file.

Microsoft definitely has worked hard on the security feature of workbooks.
 
Upvote 0
Hi Bob, thanks for your response. The problem is that it is not even prompting me for a password. I double click to view the project and instead of a password entry box popping up, all I am getting is a "project is unviewable" message box.
 
Upvote 0
Hi Andrew,

Yeah, thanks. It certainly wasn't when it was sent out and it is now. on switching off that shared workbook property, I can access the VBA but I still cannot get the xlveryhidden worksheet to unhide using the "Sheet18.Visible = xlSheetVisible" or "Sheet18.Visible = True" code.

Appreciate the help.

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,349
Messages
6,124,427
Members
449,158
Latest member
burk0007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top