Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating a username and password box
do anyone know how to create a username/password box with
a userform in microsoft Excel, I tried creating one but not able to get the excel to make decision of who is accessing, I don't want to use excel protect book, where it will exposed all my work to every user, here is my cod if txtname= user then workbookfiance.activate am I'm on the right track? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating a username and password box
You will need to save the allowable users in a list somewhere and compare
the current user against that. You can get the login user with Private Declare Function GetUserName Lib "advapi32.dll" _ Alias "GetUserNameA" _ (ByVal lpBuffer As String, _ nSize As Long) As Long Public Function UserName() As String Dim sName As String * 256 Dim cChars As Long cChars = 256 If GetUserName(sName, cChars) Then UserName = Left$(sName, cChars - 1) End If End Function Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.LeftFooter = UserName End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "kil" wrote in message ... do anyone know how to create a username/password box with a userform in microsoft Excel, I tried creating one but not able to get the excel to make decision of who is accessing, I don't want to use excel protect book, where it will exposed all my work to every user, here is my cod if txtname= user then workbookfiance.activate am I'm on the right track? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
link from web page to excel asks for username and password | Excel Discussion (Misc queries) | |||
link to workbook from web page asks for username and password | Excel Discussion (Misc queries) | |||
How do I get a adcenter username and password | Excel Discussion (Misc queries) | |||
Is there a template for username and password storage for Excel? | Excel Discussion (Misc queries) | |||
username and password for form excel vba macro | Excel Programming |