I want to get a username who has a file already open. Is it possible by VBA?
I want to get a username who has a file already open. Is it possible by VBA?
Hi, Joakim N,
maybe like this:
Ciao,Please Login or Register to view this content.
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Thanks Holger. Works perfect.
I've seen that code before, it shows you the owner of the document, not the user
Gr
Gerard
OK. I tested on a document that I have created so the user and owner was the same. Any idea how to get the user?
Hi, Joakim,
if I open a file created by Hans W. Herber there is still my name being posted as user - is that what you asked for?
@Gerard:
it shows you the owner of the document, not the userhttp://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx and from there http://msdn.microsoft.com/en-us/libr...identifier_glysecurity identifier
(SID) A data structure of variable length that identifies user, group, and computer accounts. Every account on a network is issued a unique SID when the account is first created. Internal processes in Windows refer to an account's SID rather than the account's user or group name.
Could you post where your information comes from, please?
Ciao,
Holger
Holger,
I want to identify username of person who has the file open. It looks like the VBA-code identifies the creator/owner.
I tested following:
1. Opened a file created by another person than myself
2. Executed the VBA code
3. Returned was the creator of file. Here, I wanted that VBA should have returned myself.
@HaHoBe:
The functioncode is on several sites, for instands here.
I was also in a search for a good code (for longer time), to return current user.....
greetings
Gerard
Hi,
Iīm unable to test the code I supplied right away on a network with other users (donīt have access from home gladly). Maybe try this function
returning Application.Username (not my favourite name to work with as TestUser isnīt really that unique for me to know who opened up the workbook).Please Login or Register to view this content.
@Joakim N:
Could you remove the Solved from this thread as we are still working on a solution at present. TIA.
Ciao,
Holger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks