Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default View limited sheets in workbook based on logon/password protect

Can I create a workbook that limits the sheets that are shown after logon?
I am setting up macros to create hundreds of sheets in groups of threes.
This will eventually all my automated. But, each manager needs to only view
their data for legal reasons. There are other ways of getting this
information within the company, but the legal team would like for me to limit
access when I can.

I have never tried to password protect a document for around a hundred users
and their corresponding passwords and then only show them their three sheets
of data.

Any suggestions on where to start?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default View limited sheets in workbook based on logon/password protect

Nicole,
Here is some code to only give you an idea, it is far from complete
Also, there are other ways of doing this.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

'The workbook must be protected to prevent worksheets
'from being moved.
'All sheets should be hidden (xlVeryHidden) when the
'workbook is opened/closed - except for the start sheet
'where the user enters the password.
'-------------------------------
Private Function VisibleLies(ByRef strPassword As String)
Dim x As Long
'Establish passwords and the beginning worksheet index number.
'Assumes worksheets to display are contiguous.

Select Case strPassword
Case "abcd"
x = 2
Case "bcde"
x = 5
Case "cdef"
x = 8

'More of the same

Case "zzzz"
x = 99
End Select

If x 0 Then
Worksheets(x).Visible = True
Worksheets(x + 1).Visible = True
Worksheets(x + 2).Visible = True
Else
MsgBox "Password incorrect", vbExclamation, "Secret Stuff"
End If
End Function

'Call the function and supply password.
Sub StartItUp()
Call VisibleLies("bcde")
End Sub
'------------------------------------


"Nicole Seibert"
wrote in message
Can I create a workbook that limits the sheets that are shown after logon?
I am setting up macros to create hundreds of sheets in groups of threes.
This will eventually all my automated. But, each manager needs to only view
their data for legal reasons. There are other ways of getting this
information within the company, but the legal team would like for me to limit
access when I can.

I have never tried to password protect a document for around a hundred users
and their corresponding passwords and then only show them their three sheets
of data.

Any suggestions on where to start?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default View limited sheets in workbook based on logon/password protec

The more I read about this project the more I am finding reasons not to set
up the worksheet this way. There are many entries here saying that anyone
with a rudimentary knowledge of VBA could break in and see whatever data they
wanted. One even suggests I that I should be fired for suggesting this is a
safe way to store data. Excel 2003 addresses this issue (we are using 03)
with information rights management, but I am still looking into this. So far
it looks as if I can limit acess to read-only and such, but not limit the
user's view to three sheets out of the 300 available.

I am continuing to explore this method, but also two others as well.

Thank you for your help. I will keep posting.

"Jim Cone" wrote:

Nicole,
Here is some code to only give you an idea, it is far from complete
Also, there are other ways of doing this.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

'The workbook must be protected to prevent worksheets
'from being moved.
'All sheets should be hidden (xlVeryHidden) when the
'workbook is opened/closed - except for the start sheet
'where the user enters the password.
'-------------------------------
Private Function VisibleLies(ByRef strPassword As String)
Dim x As Long
'Establish passwords and the beginning worksheet index number.
'Assumes worksheets to display are contiguous.

Select Case strPassword
Case "abcd"
x = 2
Case "bcde"
x = 5
Case "cdef"
x = 8

'More of the same

Case "zzzz"
x = 99
End Select

If x 0 Then
Worksheets(x).Visible = True
Worksheets(x + 1).Visible = True
Worksheets(x + 2).Visible = True
Else
MsgBox "Password incorrect", vbExclamation, "Secret Stuff"
End If
End Function

'Call the function and supply password.
Sub StartItUp()
Call VisibleLies("bcde")
End Sub
'------------------------------------


"Nicole Seibert"
wrote in message
Can I create a workbook that limits the sheets that are shown after logon?
I am setting up macros to create hundreds of sheets in groups of threes.
This will eventually all my automated. But, each manager needs to only view
their data for legal reasons. There are other ways of getting this
information within the company, but the legal team would like for me to limit
access when I can.

I have never tried to password protect a document for around a hundred users
and their corresponding passwords and then only show them their three sheets
of data.

Any suggestions on where to start?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default View limited sheets in workbook based on logon/password protec

Excel is not a safe place to store secret data.

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Nicole Seibert"
wrote in message ...
The more I read about this project the more I am finding reasons not to set
up the worksheet this way. There are many entries here saying that anyone
with a rudimentary knowledge of VBA could break in and see whatever data they
wanted. One even suggests I that I should be fired for suggesting this is a
safe way to store data. Excel 2003 addresses this issue (we are using 03)
with information rights management, but I am still looking into this. So far
it looks as if I can limit acess to read-only and such, but not limit the
user's view to three sheets out of the 300 available.

I am continuing to explore this method, but also two others as well.

Thank you for your help. I will keep posting.

"Jim Cone" wrote:

Nicole,
Here is some code to only give you an idea, it is far from complete
Also, there are other ways of doing this.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

'The workbook must be protected to prevent worksheets
'from being moved.
'All sheets should be hidden (xlVeryHidden) when the
'workbook is opened/closed - except for the start sheet
'where the user enters the password.
'-------------------------------
Private Function VisibleLies(ByRef strPassword As String)
Dim x As Long
'Establish passwords and the beginning worksheet index number.
'Assumes worksheets to display are contiguous.

Select Case strPassword
Case "abcd"
x = 2
Case "bcde"
x = 5
Case "cdef"
x = 8

'More of the same

Case "zzzz"
x = 99
End Select

If x 0 Then
Worksheets(x).Visible = True
Worksheets(x + 1).Visible = True
Worksheets(x + 2).Visible = True
Else
MsgBox "Password incorrect", vbExclamation, "Secret Stuff"
End If
End Function

'Call the function and supply password.
Sub StartItUp()
Call VisibleLies("bcde")
End Sub
'------------------------------------


"Nicole Seibert"
wrote in message
Can I create a workbook that limits the sheets that are shown after logon?
I am setting up macros to create hundreds of sheets in groups of threes.
This will eventually all my automated. But, each manager needs to only view
their data for legal reasons. There are other ways of getting this
information within the company, but the legal team would like for me to limit
access when I can.

I have never tried to password protect a document for around a hundred users
and their corresponding passwords and then only show them their three sheets
of data.

Any suggestions on where to start?

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
Protect Multiple Worksheets from view before password Robb @ FLW Excel Discussion (Misc queries) 1 October 8th 09 11:36 PM
Password protect for view only Kathy Excel Discussion (Misc queries) 2 April 5th 06 05:04 PM
password protect sheets rufusf Excel Worksheet Functions 2 March 7th 06 09:00 AM
Protect sheets w/o user password prompt hotherps[_149_] Excel Programming 6 November 24th 04 04:10 PM
Protect Excel sheets with Password Using VBA Iain Excel Programming 2 October 22nd 04 08:59 AM


All times are GMT +1. The time now is 11:34 PM.

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

About Us

"It's about Microsoft Excel"