Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a button in excel, i want only certain users to be able to press it,
is they any way i can add permissions to the button? Neil. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Neil,
You could create a login userform and then use the username to determine whether to enable or disable the command button. You could probably do the same just using Windows username properties. I guess it depends on how large your user base might be. I've used the login form method on several projects. Ken "Neil Holden" wrote: I have a button in excel, i want only certain users to be able to press it, is they any way i can add permissions to the button? Neil. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Neil,
You could do this but it's not secure. The variable S is a comma deleted string of allowed users. If the active user isn't in the list then the sub terminates Sub Button1_Click() S = "aaa,bbb,ccc" v = Split(S, ",") For x = 0 To UBound(v) If Environ("username") = v(x) Then allowed = True Exit For End If Next If Not allowed Then Exit Sub MsgBox "OK" 'Your Code End Sub Mike "Neil Holden" wrote: I have a button in excel, i want only certain users to be able to press it, is they any way i can add permissions to the button? Neil. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Qualifying permissions in protect unprotect macro. | Excel Discussion (Misc queries) | |||
How to Use Permissions | Excel Discussion (Misc queries) | |||
folder permissions with a macro | Excel Discussion (Misc queries) | |||
Permissions | Excel Discussion (Misc queries) | |||
Permissions | Excel Worksheet Functions |