+ Reply to Thread
Results 1 to 4 of 4

View limited sheets in workbook based on logon/password protect

  1. #1
    Nicole Seibert
    Guest

    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. #2
    Jim Cone
    Guest

    Re: 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" <[email protected]>
    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. #3
    Nicole Seibert
    Guest

    Re: 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" <[email protected]>
    > 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. #4
    Jim Cone
    Guest

    Re: 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" <[email protected]>
    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" <[email protected]>
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1