Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nick
 
Posts: n/a
Default Worksheet Access Denied

I have a program that is password protected when opened, so it can either be
opened by a password and be edited or can be opened as read-only. When the
file is opened as a read-only is there a way to deny complete access to sheet
2, but when the correct password is entered then all sheets can be viewed.
This is becasue sheet 2 has information that is only needed by certain people.

Thanks People
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Not really.

I would guess that any suggestion you get would rely on macros. And macros can
be disabled by the user. So they could see anything they wanted.

On top of that worksheet/workbook protection (via tools|protection) is very
weak. It's really made to stop errors--not for security. This kind of
protection can be broken very easily.

If you have data that you don't want others to see, don't put it into excel--or
don't share that excel file with them.

Nick wrote:

I have a program that is password protected when opened, so it can either be
opened by a password and be edited or can be opened as read-only. When the
file is opened as a read-only is there a way to deny complete access to sheet
2, but when the correct password is entered then all sheets can be viewed.
This is becasue sheet 2 has information that is only needed by certain people.

Thanks People


--

Dave Peterson
  #3   Report Post  
Nick
 
Posts: n/a
Default

Thanks Dave, I thought it was a long shot. I have written the following code
to password protect the sheet.

Dim MyStr1 As String, MyStr2 As String
MyStr2 = ("engineering")
MyStr1 = InputBox ("Password Required")
If MyStr1 = "" Then Exit Sub
If MyStr1 = MyStr2 Then
Sheets("Parts Spreadsheet").Select
Else
MsgBox "Incorrect Password"
End If

The problem with this is that the user can still access the Parts
Spreadsheet sheet by clicking the sheet at the bottom left corner of the
screen. Is there a way to stop this.

I have tried hiding the sheet but then the macro does not run as it can not
find the sheet. I'm struggling.

Can you help

Cheers


"Dave Peterson" wrote:

Not really.

I would guess that any suggestion you get would rely on macros. And macros can
be disabled by the user. So they could see anything they wanted.

On top of that worksheet/workbook protection (via tools|protection) is very
weak. It's really made to stop errors--not for security. This kind of
protection can be broken very easily.

If you have data that you don't want others to see, don't put it into excel--or
don't share that excel file with them.

Nick wrote:

I have a program that is password protected when opened, so it can either be
opened by a password and be edited or can be opened as read-only. When the
file is opened as a read-only is there a way to deny complete access to sheet
2, but when the correct password is entered then all sheets can be viewed.
This is becasue sheet 2 has information that is only needed by certain people.

Thanks People


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about this (still not secure, though, since it depends on macros):

rightclick on the topsecret worksheet tab, select view code and paste this in:

Option Explicit
Private Sub Worksheet_Activate()

Dim myPwd As String
Dim MyStr As String

Me.Rows.Hidden = True

myPwd = "engineering"

MyStr = InputBox("Password Required")

If MyStr = "" Then Exit Sub
If MyStr = myPwd Then
Me.Rows.Hidden = False
Else
MsgBox "Incorrect Password"
Worksheets("header").Select 'go to a different worksheet
End If

End Sub

Remember that this isn't secure. Disabling macros would stop this from even
working.

And the industrious could use formulas like:
=if(sheet2!a1="","",sheet2!a1)

and fill up a sheet with these formulas to "copy" the values out of the secret
sheet.

===
If this is really sensitive data, don't share it in excel.

(Releasing salaries, costs, prices could get you into trouble.)



Nick wrote:

Thanks Dave, I thought it was a long shot. I have written the following code
to password protect the sheet.

Dim MyStr1 As String, MyStr2 As String
MyStr2 = ("engineering")
MyStr1 = InputBox ("Password Required")
If MyStr1 = "" Then Exit Sub
If MyStr1 = MyStr2 Then
Sheets("Parts Spreadsheet").Select
Else
MsgBox "Incorrect Password"
End If

The problem with this is that the user can still access the Parts
Spreadsheet sheet by clicking the sheet at the bottom left corner of the
screen. Is there a way to stop this.

I have tried hiding the sheet but then the macro does not run as it can not
find the sheet. I'm struggling.

Can you help

Cheers

"Dave Peterson" wrote:

Not really.

I would guess that any suggestion you get would rely on macros. And macros can
be disabled by the user. So they could see anything they wanted.

On top of that worksheet/workbook protection (via tools|protection) is very
weak. It's really made to stop errors--not for security. This kind of
protection can be broken very easily.

If you have data that you don't want others to see, don't put it into excel--or
don't share that excel file with them.

Nick wrote:

I have a program that is password protected when opened, so it can either be
opened by a password and be edited or can be opened as read-only. When the
file is opened as a read-only is there a way to deny complete access to sheet
2, but when the correct password is entered then all sheets can be viewed.
This is becasue sheet 2 has information that is only needed by certain people.

Thanks People


--

Dave Peterson


--

Dave Peterson
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
How Do You Delete an Excel File that Shows to "Access Denied" Riccoop Excel Discussion (Misc queries) 1 April 16th 05 12:16 AM
access my data from my master worksheet while calculation is don. Kannan.Iyer Excel Worksheet Functions 1 April 6th 05 01:23 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
How do I give all access to one worksheet but not to other worksh. B Fraissinet Excel Worksheet Functions 1 January 12th 05 06:37 AM
How to call worksheet functions from Access ? Martin Plamondon Excel Worksheet Functions 0 November 18th 04 06:50 PM


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

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"