Free Microsoft Excel 2013 Quick Reference

Unable to password-protect "VeryHidden" worksheet

Hello

I'm using Excel 2007. In VBE I tried to password-protect a "VeryHidden"
worksheet by going to VBAProject Properties, Protection, check the box on
"Lock project for viewing" and set the password in the boxes as provided.

However, each time I re-open the file (after saving and closing the file),
the worksheet was not protected. When I check the VBAProject Properties, the
check box of "Lock project for viewing" and the "Password to view project
properties" are all back to its original state of unchecked/empty.

Please advise what steps I've missed to do the password protection.

Many thanks
--
exalan


Post your answer or comment

comments powered by Disqus
Hi,

I've been fooling around with this code for hours now and am obviously missing something here
I've got a workbook in which I need to password protect five sheets (23, 24, 30, 31 and 32)
I've been using the code given on this forum to password protect a worksheet, you can find it here:
http://www.ozgrid.com/VBA/stop-worksheet-viewing.htm

It works perfectly for protecting one sheet.
How do I make this work for more then one sheet?
I can get it as far as asking a password for every sheet and it hides columns for every sheet, but it will only return to the last active sheet for the first sheet entered in the code.
For the others it will remain on the protected sheet, after which it's very easy to unhide the hidden columns and see the contents.

Thanks,
Agnes

I've searched the forum but can't seem to find this, only questions on how to unlock them...

I have 1 worksheet in the workbook I want to password protect. I've tried some VBA code I found but it didn't seem to do anything at all.

The Sheet is Sheet5 and titled "Misc"... Is there a way to just password protect this sheet?

I should add that I want to password protect the worksheet from being viewed, not from being edited. Is that possible?

Help! I am trying to password protect a worksheet and the "Password to open"
box is not available. The "password to edit" box is OK.

I know how to password protect a worksheet, however, this still allows
someone to delete this worksheet. Is there a way to only allow it to be
deleted with a password?

Can anybody help me. I am trying to password protect my worksheet 2 of 3 and
I can not seem to find how this can be done.

Any help will be grateful

Help! I am trying to password protect a worksheet and the "Password to open"
box is not available. The "password to edit" box is OK.

I am trying to add a command button that will set a custom view, password protect all worksheets, and finally password protect the entire workbook structure. The code I am using will correctly set the view and add the password to the worksheets, but it will not apply the password to the workbook structure. What do I need to add?


	VB:
	
 
Private Sub cmdReset_Click() 
     
    ActiveWorkbook.Unprotect Password:="test" 
    ActiveWorkbook.CustomViews("Sales").Show 
    ActiveWorkbook.Protect Password:="test" 
    ActiveSheet.Unprotect Password:="test" 
     
    Sheets("Accessories").Select 
    ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _ 
    False 
    ActiveSheet.Protect Password:="test" 
     
    Sheets("Trim").Select 
    ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _ 
    False 
    ActiveSheet.Protect Password:="test" 
     
    Sheets("Hi-Tensile").Select 
    ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _ 
    False 
    ActiveSheet.Protect Password:="test" 
     
    Sheets("Panels").Select 
    Range("D9").Select 
    ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _ 
    False 
    ActiveSheet.Protect Password:="test" 
     
     
    ActiveWorkbook.Protect Structure:=True, Windows:=False 
    ActiveWorkbook.Protect Password:="test" 
     
     
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


I have an operational workbook with 50 worksheets in it. I want to password
protect the same cells (same cell address) in each worksheet. How do I do
that in one process and not have to do the same process 50 times?

I know how to password protect individual excel worksheets or workbooks which
appear in a folder but can I / how do I protect a complete folder containing
many individual worksheets / workbooks.

I have a workbook in which I require several worksheets to be password protected.

I recorded a macro and named it Sub Password1(), to password protect the worksheets, then one named Sub Password2(), to un-protect the sheet, but it did not record the actual password.

Then when I run macro 'Sub Password1', the sheet is protected but I can select >Tools>Protection>Unprotect Sheet, and without a password it unlocks.

What I need is to run a macro (with password) to lock several worksheets, and another to unlock them. ???

Hello,

I am not sure if this would be feasible, but I thought that someone might know. I have a workbook with 5 sheets. Each sheet is assigned to different person to track and log their hours worked on each project.

Is it possible to password protect each sheet so that an employee can only see there sheet if they enter their password, and if they click on someone else's tab, then they would be prompted to enter a password? I have done protections in the past where you cannot edit the data - but it is still visible. My concern is that I do not want everyone to be able to see everyone else's hours.

Any assistance would be great. Or if this is not possible, if someone could let me know that would be great also so that I can start looking at other ways.

Best Regards,

I send files to the field for their input and link the returned data to an Access database. My problem is this:
I password protect the columns of data I do not allow them to change but occasionall they have changed the worksheet name on me and when I don't catch it it destroys my link in access and causes me extra work. Is there a way to password protect the worksheet name?

You could have the worksheet hidden and the workbook protected this will mean
that users cant unhide the sheets without the password.

If you have macros enabled then you could also have a command button on one
of the active sheets to enable the users who are allowed to see the hidden
sheets to do so quickly, create a command button and use code something like

Private Sub CommandButton1_Click()

Dim passw As String
passw = InputBox("Enter Password to unhide sheets")
ActiveWorkbook.Unprotect (passw)
Worksheets("yoursheet").Visible = True
Worksheets("yoursheet2").Visible = True

End Sub

Hth

Stu

"Brian" wrote:

> hello all,
> i was wondering if there is a way to password protect a worksheet. i have
> many workbooks with multiple worksheets that people have access to. there are
> sheets that people do not need to see. i know i can hide these sheets, but i
> would rather have a password to open them so that if there are people who
> need to open them they can by entering a password.
> thank you for your time and have a great day!
> --
> Thank You in advance, Brian

I would like to know if there is a way to protect or lock a worksheet, inside
a workbook, so that other users cannot even open the worksheet. I am
familiar with how to password protect a worksheet so users cannot edit or
modify locked cells, however, I would like to keep other users from even
going into the other worksheets within the workbook. I have not yet found a
method for doing so.

Or is there a way to "hide" a worksheet within the workbook so that other
users cannot see it?

Hi in below stated code i do get this error:
Unable to Match property of Worksheet class function.
It seems I made everything right, but I cannot figure out why this message appears. Hope you can find out the problem...

Private Sub StudentButton_Click()
    Dim DateField As Range, ResultTable As Range
    Dim StartDay As Date, EndDay As Date
    Dim lRow As Long, lColumn As Long
    Dim sDayPos As Long, eDayPos As Long
    Dim StartRow As Integer, StartColumn As Integer
    Dim MyMonth As Integer, MyYears As Integer, lDate As Integer

    StartRow = Range("FirstCell").Row
    StartColumn = Range("FirstCell").Column

    Set ResultTable = Range("ResultTable")
    Set DateField = Sheets(2).Range("Dates")
    
    'Getting Last column number
    With Range(StartRow & ":" & StartRow)
         lColumn = .Cells(1, .Columns.Count).End(xlToLeft).Column
    End With

    For MyYears = 1 To lColumn - StartColumn
        For MyMonth = 1 To 12

----------------------------------------- SOME PART OF CODE BETWEEN ------------------------------

            'Getting positions for Fist day and last day of a month in Datafield Range
            With WorksheetFunction
                sDayPos = .Match(StartDay, DateField, 0)   <<<<<<< CAUSES ERROR
                eDayPos = .Match(EndDay, DateField, 0)    <<<<<<< CAUSES ERROR
            End With

        MsgBox sDayPos & " and " & eDayPos
        Next MyMonth
    Next MyYears
End Sub


Is it possible to password protect a worksheet in Excel and still allow other
users to add comments to cells?

Thanks

Rich

I would like to know if there is a way to protect or lock a worksheet, inside
a workbook, so that other users cannot even open the worksheet. I am
familiar with how to password protect a worksheet so users cannot edit or
modify locked cells, however, I would like to keep other users from even
going into the other worksheets within the workbook. I have not yet found a
method for doing so.

Or is there a way to "hide" a worksheet within the workbook so that other
users cannot see it?

I have a workbook say Book1.xls with 12 worksheets say Rep1, Rep2,
Rep3,...Rep12 for 12 different employees. These sheets are exactly similar in
layout and format except data. I was able to select all sheets and 'lock' and
'hide' desired cells in each in one stroke. But locking and hiding of cells
dont come into effect till I protect each sheet. I want to password protect
each sheet with the same password. Is there a way to password protect all
worksheets or the entire workbook in one go? The workbook Book1.xls along
with other workbooks would be shared on a network drive by a few employees. I
see there is an option:Tools-Protection-Protect and Share Workbook. Though
this option from its name sounds like it would be able to protect the entire
workbook, the menu inside doesn't seem to lead in the direction that I want
to go in. If this is not the option to do my job, what does
Tools-Protection-Protect and Share Workbook do? Thanks.

Why would you be unable to rename an unprotected worksheet?

Hi,
I need to password protect hundreds of exel files with the same password,
but my boss wants them done one by one (as opposed to a zip file). The files
are in different directories and have different names. Can I create a macro
that will do the following once I have the file open?
Go to Save As
Go to Tools
Select General Options
Enter password to protect (i.e. 1234)
click OK
Retype password
Click OK
Save

I have been doing this for the past hour one file at a time and my fingers
are really tired now. Any help is GREATLY appreciated.

I want to create a spreadsheet with some columns that contain data that I
want to password protect to limit access to only some users. Alternatively, I
would like to create a custom view that hides these columns and then password
protect the view. I can't figure out how to do this. Any help?

I need a way to password protect a control so that when it is clicked the
user is faced with a dialog box asking to enter password. The control is a
single page on a multipage control. The other pages I want to be made
available exept the "ADMIN" page.

is it possible to password protect that no new columns can be inserted? If yes then how?

Cheers
Rain

Is it possible to password protect several worksheets in one step, or do I
need to them all individually?


No luck finding an answer? You could always try Google.