Can I get a pop up box that incorporates the windows logged on user? It would need to recognise the individual windows log on ID's?
Can I get a pop up box that incorporates the windows logged on user? It would need to recognise the individual windows log on ID's?
Yes,
try this..
![]()
MsgBox (Environ("UserName"))
Rule 1: Never merge cells
Rule 2: See rule 1
"Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".
Try one of these User Defined Functions:
Using Regular Excel VBA
![]()
Function NetworkUserName() As String NetworkUserName = Environ("Username") End Function
Using the windows API
Then use this API function call in your own function![]()
Declare Function apiGetUserName _ Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, _ nSize As Long) As Long
Does that help?![]()
Function GetUserName() As String Application.Volatile Dim sBuff As String * 25 Dim lBuffLen As Long lBuffLen = 25 apiGetUserName sBuff, lBuffLen GetUserName = Left(sBuff, lBuffLen - 1) End Function
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks