Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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
...


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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
...




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Excel Worksheet Protection

hide the entire sheet.

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

rgds,



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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,


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Worksheet Password Protection Christina Excel Worksheet Functions 2 March 19th 13 12:24 PM
Excel Worksheet protection from viewing Sungibungi Setting up and Configuration of Excel 1 July 31st 08 01:16 AM
EXCEl worksheet protection xwhaloo1 Excel Discussion (Misc queries) 2 April 4th 08 10:15 PM
Excel Worksheet protection BillFitz Excel Discussion (Misc queries) 3 January 5th 08 05:41 PM
protection of the worksheet in Excel 97 Tony Excel Programming 1 July 29th 03 02:02 AM


All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"