Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Pete,
but i have know idea of how to get excel to know who has logged in. This gets you the name of the person logged in: Option Explicit Private Const MAX_USERNAME As Long = 256 Private Declare Function GetUserName Lib "advapi32.dll" _ Alias "GetUserNameA" _ (ByVal lpBuffer As String, _ nSize As Long) As Long Function rgbGetUserName() As String 'return the name of the user Dim tmp As String tmp = Space$(MAX_USERNAME) If GetUserName(tmp, Len(tmp)) Then rgbGetUserName = TrimNull(tmp) End If End Function Private Function TrimNull(item As String) Dim pos As Integer pos = InStr(item, Chr$(0)) If pos Then TrimNull = Left$(item, pos - 1) Else: TrimNull = item End If End Function Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keeping Custom Chart Settings | Charts and Charting in Excel | |||
are user-defined chart settings transferrable? | Setting up and Configuration of Excel | |||
Saving Print Settings - Customized for each user | Excel Discussion (Misc queries) | |||
Keep custom toolbar settings - Help!! | Excel Discussion (Misc queries) | |||
Keep Custom Menu settings - help !! | Excel Worksheet Functions |