Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to have an Excel spreadsheet that hides/unhides
worksheets based on the Active Directory network login? If that is not possible, how about a login into the Workbook and then do hide/unhide based on that? Advice on how to do either? Thanks in Advance. Joe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Environ("UserName")
should get you the login name. My suggestion would be to use the very hidden attribute of the visible property. Additionally when the file is being closed make sure that you set the hidden property for all of the confidential sheets to very hidden. Otherwise if the book is opened with macros disabled the confidential sheets may still be visible. Ensure that the code to hide and unhide the sheets is not accessible through the Macro's menu - "Option Private Module" - at the top of the code will ensure that the macro's are not visible to the user. Make shure that your code is protected with a password. Finally after all of this there is nothing to stop the user from writing a simple script such as this to unhide the sheets anyways... sub UnhideAll dim wks as worksheet for each wks in activeworkbook.worksheets wks.visible = xlSheetVisible next wks exit sub -- HTH... Jim Thomlinson "jej1216" wrote: Is it possible to have an Excel spreadsheet that hides/unhides worksheets based on the Active Directory network login? If that is not possible, how about a login into the Workbook and then do hide/unhide based on that? Advice on how to do either? Thanks in Advance. Joe |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hmm,
Thanks Jim - I'll give it a try. Joe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to hide and unhide based on criteria | Excel Discussion (Misc queries) | |||
Hide and/or Unhide Worksheets | Excel Programming | |||
Hide and unhide worksheets | Excel Programming | |||
Unhide sheets based on NT login | Excel Programming | |||
Hide/Unhide worksheets help | Excel Programming |