Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect Multiple Worksheets from view before password | Excel Discussion (Misc queries) | |||
Password protect for view only | Excel Discussion (Misc queries) | |||
password protect sheets | Excel Worksheet Functions | |||
Protect sheets w/o user password prompt | Excel Programming | |||
Protect Excel sheets with Password Using VBA | Excel Programming |