Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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/
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I report to User A vs User B from shared data table? RogClark Excel Discussion (Misc queries) 0 April 30th 09 07:54 PM
making NT user/login user appear in a cell [email protected] Excel Worksheet Functions 1 March 3rd 09 03:41 AM
How do I format a cell, so the user must use a user calendar? nathan Excel Discussion (Misc queries) 1 January 16th 06 06:40 PM
How do I format a cell, so the user must use a user calendar? nathan Excel Discussion (Misc queries) 0 January 16th 06 05:26 PM
How to: Make user click End User License Agreement acceptance jasonsweeney[_21_] Excel Programming 7 January 30th 04 01:41 AM


All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"