![]() |
Vba - Log in user name
Hi all,
if I use: application.username, I get the "Computers name" how can I get the actual logged in user in the network? something like: application.currentlogin ?? I also need to know if there is any posibility that more than 1 use can input data into the same excel file on the same time? Thanks in advance. Aldo -- Message posted from http://www.ExcelForum.com |
Vba - Log in user name
Hi, following code will help you. http://www.dicks-blog.com/excel/2004...e_usernam.html Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, _ nSize As Long) As Long 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 -- Haldun Alay "ajliaks " , iletide şunu yazdı ... Hi all, if I use: application.username, I get the "Computers name" how can I get the actual logged in user in the network? something like: application.currentlogin ?? I also need to know if there is any posibility that more than 1 user can input data into the same excel file on the same time? Thanks in advance. Aldo. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 05:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com