How to block access for a certain group of users ?

RomulusMilea

Board Regular
Joined
May 11, 2002
Messages
171
Hello all,

I was wondering if it is possible to create a macro routine for a specific action: I have created an Excel file with some important calculation, I will send it to a group of users, but I want certain users (having known user names) to open the file and to receive kind of message saying "This file cannot be accessed by this user. Please contact your administrator". User will have to click on OK button and right away all cells to remain visible, but to become password protected, with hidden formulas and also impossible to be copied. Does anyone have any suggestions ? Thank you :rolleyes:.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
could you - assuming your other users aren't going to try and crack your codes, just list the usernames, eg. Password protect the sheet with something like

dim password as string
username = inputbox "enter user name"

dim password as string

select case username

case joe, mark, pete (users with access)
password = [whatever the password for your workbook is]

etc, etc?
 
Upvote 0
Excel's security is not much good, so the operating system is your best bet. You could put the workbook in a folder with restricted permissions. That way, you could deny some people access, give others read-only access, and give a select group read-write access. One advantage; any other files which need the same treatment can be dropped into the same folder.

Denis
 
Upvote 0
to Sydney Geek

How would you do this controlled folder access, please - sounds good!
 
Upvote 0
It's fairly standard Windows admin -- the place I work, they regularly set up folders with restricted access. Talk to the IT guys about your needs, and they should be able to help.

EDIT -- Just ran a quick search and found this:

http://www.microsoft.com/windowsxp/using/security/learnmore/accesscontrol.mspx
http://vb123.com/toolshed/04_docs/accessdb_op_security.htm

Note -- you must be using NTFS, not FAT32 file system, to use this feature. But that shouldn't be an issue in a corporate environment.

Denis
 
Upvote 0
thanks , Denis

Many thanks Denis, for pointing me in the right direction, and for the link to a previous post
 
Upvote 0

Forum statistics

Threads
1,207,013
Messages
6,076,149
Members
446,187
Latest member
LMill

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top