Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Worksheet Access Problem
Greetings to the Group
Some time ago I saw an example of how to create a workbook such that the user was required to "log in" to the workbook and, depending on who the user was, the workbook would display only those worksheets the particular user was allowed to access. Does anyone either remember this or can you tell me how to do this? Thanks is advance... Russ Morgan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Worksheet Access Problem
Hi Russ
You can do this but if the user not enabled the macro's it will not work. One way is to hide all sheets except one and unhide the sheets you want in the workbook open event. **** check the username and unhide only the sheets you want then for this user*** ****You can use this to get the name Environ$("username") **** Place a message on the first sheet with "you must enabled macro's to work with this file" And hide the sheets in the beforeclose event (see macro example below) You must also protect your project in the VBA editor because a user can unhide the sheets there also if you don't do that The first Sheet stay always visible with this macro Sub HidealmostAll() Dim a As Integer For a = 2 To Sheets.Count Sheets(a).Visible = xlVeryHidden Next a End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "RUSS" wrote in message ... Greetings to the Group Some time ago I saw an example of how to create a workbook such that the user was required to "log in" to the workbook and, depending on who the user was, the workbook would display only those worksheets the particular user was allowed to access. Does anyone either remember this or can you tell me how to do this? Thanks is advance... Russ Morgan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
why can't I access conditional formatting? | New Users to Excel | |||
Conditional Worksheet Access Question | Excel Worksheet Functions | |||
cannot access conditional formating for a cell, why? | Excel Discussion (Misc queries) | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming |