PDA

View Full Version : [SOLVED] Hide & protect sheet



excelliot
07-11-2005, 12:01 AM
Is it posiible to hide & protect sheet so that no one can see that it is hidden & unprotect it withot me.:bug:

Bob Phillips
07-11-2005, 01:03 AM
Is it posiible to hide & protect sheet so that no one can see that it is hidden & unprotect it withot me.:bug:

The best that you can do is to go into the VB IDE, select the worksheet in the exploirer window, and then in the properties window (Ctrl-G), set the Visible property to very hidden. Hidden will hide it, but it will still show in Format>Sheets, whereas very hidden will not show it there. Of course, if the user is aware of this, they could change it back in the same way.

excelliot
07-11-2005, 01:44 AM
The best that you can do is to go into the VB IDE, select the worksheet in the exploirer window, and then in the properties window (Ctrl-G), set the Visible property to very hidden. Hidfden will hide it, but it will still show in Format>Sheets, whereas very hidden will not show it there. Of course, if the user is aware of this, they could chan ge it back in the same way.

This works for newbie who dont know about editing the sheet through VB IDE.
But i have seen one sheet in which sheet waw extremely hidden to whic i could not unhide it throuhgh VB IDE.

Bob Phillips
07-11-2005, 03:10 AM
This works for newbie who dont know about editing the sheet through VB IDE.
But i have seen one sheet in which sheet waw extremely hidden to whic i could not unhide it throuhgh VB IDE.

There might be some VBA project protection, or something else, but I have never seen an Excel file that I couldn't crack.

avkb03
07-11-2005, 02:04 PM
If your trying to hide confidential info, don't bother with the built-in protection. There is software out there that can crack it in seconds...

Seperate document protected by network rights is always best.

Ken Puls
07-11-2005, 02:16 PM
But i have seen one sheet in which sheet waw extremely hidden to whic i could not unhide it throuhgh VB IDE.

The only way I can see this is if the VBProject password was set. Even so, as Bob mentioned, it's easily cracked by someone who knows what they're doing.

Personally, I use xlVeryHidden all the time to hide sheets that I don't want users to play with, and I never bother with protecting the Project. If they're that savvy and that determined, they will get in. Excel is NOT a secure development platform for confidential info, and MS has never claimed that it was.

If your files are that confidential, put them somewhere else. If you have a user who is that problematic, discipline or fire them. If you've asked them not to go in there, made it as difficult as you can and they still crack it... I'd say you'd have just cause.

My 2 cents.

excelliot
07-11-2005, 10:12 PM
Ok can i hide sheet very hidden & control it by macro so that it can not be unhidden. or can i do it by another way....

Ken Puls
07-11-2005, 10:16 PM
Ok can i hide sheet very hidden & control it by macro so that it can not be unhidden. or can i do it by another way....

Uh... sort of.

This will hide the sheet:

worksheets("Sheet1").visible = xlsheetveryhidden

This will unhide it:

worksheets("Sheet1").visible = xlsheetvisible

But what we were trying to say is that even if you do mark it VeryHidden, a use CAN still walk into the VBProject and change the status manually, or via the immediate window.

excelliot
07-12-2005, 01:27 AM
Look at this sheet which is in KB
in this sheet there is 2 sheets whic is xlveryhidden

this can not be unhidden

how this can be done

Bob Phillips
07-12-2005, 03:12 AM
Look at this sheet which is in KB
in this sheet there is 2 sheets whic is xlveryhidden

this can not be unhidden

how this can be done

It is done.

As Ken and I said, protection in Excel is easily beaten

excelliot
07-12-2005, 03:19 AM
It is done.

As Ken and I said, protection in Excel is easily beaten

Can u tell me how to prorect sheet like sheet i have provided & unprotect it

Bob Phillips
07-12-2005, 03:34 AM
Can u tell me how to prorect sheet like sheet i have provided & unprotect it

Do it in Excel with the macro recorder on, it will give you the code.

excelliot
07-12-2005, 10:50 PM
What is workbook structure & windows structure in xl.

How to protect workbook structure & window structure.

Ken Puls
07-12-2005, 10:55 PM
I really don't follow quite what you're asking here... can you explain what you're after, exactly?

excelliot
07-12-2005, 11:01 PM
I really don't follow quite what you're asking here... can you explain what you're after, exactly?

In a sheet workbook structure & windows structure is protected

can u tell me How to protect workbook structure & window structure.

Ken Puls
07-12-2005, 11:08 PM
Ah, sorry excelliot. I've never used those properties yet.

Here you go:

ActiveWorkbook.Protect structure:=True, Windows:=True

HTH,

Justinlabenne
07-12-2005, 11:12 PM
in version 2000, I am at work and can't properly recall what differences on newer versions for the protection dialog box.

Manually:
TOOLS > PROTECTION > PROTECT WORKBOOK:

Place a check next to "Windows"

VBA:

Option Explicit

Sub test()
With Workbooks(ThisWorkbook.Name)
.Protect , True, True
End With
End Sub

excelliot
07-13-2005, 12:08 AM
thank all