Hi,
I have a bit of code that detects whether or not an excel file is already open - it returns a value 'true' or 'false' and then the rest of the code either executes or stops depending on the answer. This is great as it means that changes can be made to a master document by the code and saved without fear of being lost.
What I would like it to also do is, in the case that the file is already open by someone else on the network, to display the username of the person who has it open.
When you try to manually open an already open file, a dialogue box pops up saying "-Filename-<filename> is locked for editing, by <username>-username-. Open read-only or click notify to (etc.)"
How do you get VBA code to read <username>-username-?
Does anyone know how this can be done?</username></username></filename>
I have a bit of code that detects whether or not an excel file is already open - it returns a value 'true' or 'false' and then the rest of the code either executes or stops depending on the answer. This is great as it means that changes can be made to a master document by the code and saved without fear of being lost.
What I would like it to also do is, in the case that the file is already open by someone else on the network, to display the username of the person who has it open.
When you try to manually open an already open file, a dialogue box pops up saying "-Filename-<filename> is locked for editing, by <username>-username-. Open read-only or click notify to (etc.)"
How do you get VBA code to read <username>-username-?
Does anyone know how this can be done?</username></username></filename>