Is there a way that I can find the username of the person that may have a file open? I have a script that checks to see if a spreadsheet is open then creates a msgbox if it is. I would like to have the username of the person with the file open in the message.
Thanks for the suggestions. I either couldn't get them to work or it returned the wrong name.
userstatus I couldn't get to work. I tried:
ActiveWorkbook.UserStatus
user = ActiveWorkbook.UserStatus
and a couple of other things, but it errored on me everytime.
writereservedby Gave me the name of the person that last saved it as write reserved.
The script that protector posted gave me an ActiveX error.
Loomah's gave me my login name.
I am not sure if I didn't make myself clear when I posted my original message. I am wanting to return the name that shows in the box when someone else has a spreadsheet open. Such as: This file has been locked for editing by "Kelly" Any other ideas?
If you can't get the solution in this forum have you tried any others?
E.g. Microsoft's excel programmers newsgroup is what I always used to use. Others include vbcity.com, vb-world.net, mvps.org
I'm intrigued by this problem for some reason!! I've tried to work it out but all I can do is access properties of a closed file accross a network or any file locally.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.