Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
why can't I access conditional formatting? dennis New Users to Excel 2 March 7th 06 12:25 AM
Conditional Worksheet Access Question RUSS Excel Worksheet Functions 0 January 10th 06 08:14 PM
cannot access conditional formating for a cell, why? Steve Epstein Excel Discussion (Misc queries) 1 August 22nd 05 11:31 PM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM


All times are GMT +1. The time now is 03: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"