ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Worksheet Protection (https://www.excelbanter.com/excel-programming/371156-excel-worksheet-protection.html)

Bill Case[_2_]

Excel Worksheet Protection
 
Hi all:

I am trying to Hide a range of columns from un-qualified users while making
them password accessible (viewable and editable) to permitted users. (It is
data that should be viewed by some of a club's Executive members only.)

So far I have done the following by macro:

Unprotect sheet
Unlock everything
Lock the restricted columns
Hide the colums
Protect Sheet On with Column Format Off (False - unchecked)

I get two problems:
1) Format columns is greyed out for every column -- I want users to have
access to width etc. for the non-restricted (unlocked) columns.
2) When I try to UnHide I keep getting : "Run-time error '1004':
Unable to set the Hidden property of the Range Class".

Stupidity question: Just double checking -- (I have been playing around
with this issue for so long I think I am in a double-think stupidity loop
brought on, in part, by double negatives). When an example shows 'object
Password = "secret", "secret means any password I want to make up, right?
Also, if I type a "secret" that secret password stays at the macro level,
i.e. it doesn't get saved in some password file, right?

Regards Bill

Harald Staff

Excel Worksheet Protection
 
Hi Bill

Try this:
Cell A1: Look at this
Cell B1: EXTREMELY SECRET
Cell C1: information

Hide column B. Password protect the sheet.
Select range A1:C1. Copy
Go to another worksheet. Paste. What do you see ?

Do not include secret material in excel files. And if you have to, do not
include it in visible worksheets.

HTH. Best wishes Harald

"Bill Case" <Bill skrev i melding
...
Hi all:

I am trying to Hide a range of columns from un-qualified users while

making
them password accessible (viewable and editable) to permitted users. (It

is
data that should be viewed by some of a club's Executive members only.)

So far I have done the following by macro:

Unprotect sheet
Unlock everything
Lock the restricted columns
Hide the colums
Protect Sheet On with Column Format Off (False - unchecked)

I get two problems:
1) Format columns is greyed out for every column -- I want users to have
access to width etc. for the non-restricted (unlocked) columns.
2) When I try to UnHide I keep getting : "Run-time error '1004':
Unable to set the Hidden property of the Range Class".

Stupidity question: Just double checking -- (I have been playing around
with this issue for so long I think I am in a double-think stupidity loop
brought on, in part, by double negatives). When an example shows 'object
Password = "secret", "secret means any password I want to make up, right?
Also, if I type a "secret" that secret password stays at the macro level,
i.e. it doesn't get saved in some password file, right?

Regards Bill




Bill Case

Excel Worksheet Protection
 
Hi Harald;

I am off to try your suggestion, but I don't think it gets at the root of my
problems which a How can I hide and protect a few columns without turning
off the column formatting for all columns; and How can I best intercept an
error when these particular columns are hidden and protected and turn that
error into a password dialogue for special (Executive) access? By the way, I
know generally how to intercept an error message -- just looking for any
additional advice that meets my particular circumstantces.

As for 'Do not include secret material in excel files'; I am not overly
concerned. I am just trying to meet the criteria of the Exec of my small
club. We have no info that could start Armeggedon or cause the fall of the
Tower of Babel, just dues payment etc.

Regards Bill
"Harald Staff" wrote:

Hi Bill

Try this:
Cell A1: Look at this
Cell B1: EXTREMELY SECRET
Cell C1: information

Hide column B. Password protect the sheet.
Select range A1:C1. Copy
Go to another worksheet. Paste. What do you see ?

Do not include secret material in excel files. And if you have to, do not
include it in visible worksheets.

HTH. Best wishes Harald

"Bill Case" <Bill skrev i melding
...



Harald Staff

Excel Worksheet Protection
 
What you are allowed to do in a protected worksheet is Excel version
dependent, newer versions has a variety of priviledges to pick from. But I
believe the root of your problems is that you want to hide stuff in hidden
columns and my demo's point is that you simply can't. Leave it open or put
it elsewhere -a hidden worksheet is a lot safer, however "still unsafe" it
may be.

HTH. Best wishes Harald

"Bill Case" skrev i melding
...
Hi Harald;

I am off to try your suggestion, but I don't think it gets at the root of

my
problems which a How can I hide and protect a few columns without

turning
off the column formatting for all columns; and How can I best intercept an
error when these particular columns are hidden and protected and turn that
error into a password dialogue for special (Executive) access? By the

way, I
know generally how to intercept an error message -- just looking for any
additional advice that meets my particular circumstantces.

As for 'Do not include secret material in excel files'; I am not overly
concerned. I am just trying to meet the criteria of the Exec of my small
club. We have no info that could start Armeggedon or cause the fall of

the
Tower of Babel, just dues payment etc.

Regards Bill
"Harald Staff" wrote:

Hi Bill

Try this:
Cell A1: Look at this
Cell B1: EXTREMELY SECRET
Cell C1: information

Hide column B. Password protect the sheet.
Select range A1:C1. Copy
Go to another worksheet. Paste. What do you see ?

Do not include secret material in excel files. And if you have to, do

not
include it in visible worksheets.

HTH. Best wishes Harald

"Bill Case" <Bill skrev i melding
...





KC VBA Qns

Excel Worksheet Protection
 
hide the entire sheet.

use codes to control and make it visible upon supply of correct
password.

rgds,


Tricia Young

Excel Worksheet Protection
 
I have a workbook with three worksheets. i would like to protect the
worksheets from editting. But it's complicated.

upon opening there should be an option to type in one of three passwords.
1st PW will open the workbook and only show Sheet 1 - with no restrictions
2nd PW will open the workbook and only show Sheet 2 - with no restrictions
3rd PW will open the workbook and only show Sheet 3 - with no restrictions
No PW will open the workbook and show all Sheets - with restrictions;
users can on view the info and use AutoFilter.

How can I do this with VBA code?

Thanks
"KC VBA Qns" wrote:

hide the entire sheet.

use codes to control and make it visible upon supply of correct
password.

rgds,




All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com