Gerald Higgins
Well-known Member
- Joined
- Mar 26, 2007
- Messages
- 9,258
Hi all - thanks in advance for any help.
I have an application which basically works fine, but I am looking at making some improvements.
One thing it does is try to work with other files held on network servers.
Occasionally, these files have already been opened by another user, and so the application is unable to open them in their read/write version, which is what I need.
I have got code which can get round this by either ignoring that type of error, or getting the application to fall over in a controlled way.
What I'd really like to do however (and am struggling with) is display a message to the user that the file is already in use, and include the other user's ID in that message, so that the person using my application can contact that person and get them to close the file. I think I could just use the standard message that Excel gives you in that situation, but I'd prefer not to, partly because that includes an option to open a read-only version, which I don't want the users to select.
The way I see this working, is that the application would (try to) open all the required files at the start of the task, and if it reached a problem with any of them it would display a clear message to the user, identifying the other user, and then shut down. IF all the required files were opened successfully, only then would it go on to perform the main tasks.
Any ideas on this ?
Thanks again in advance for any help.
I have an application which basically works fine, but I am looking at making some improvements.
One thing it does is try to work with other files held on network servers.
Occasionally, these files have already been opened by another user, and so the application is unable to open them in their read/write version, which is what I need.
I have got code which can get round this by either ignoring that type of error, or getting the application to fall over in a controlled way.
What I'd really like to do however (and am struggling with) is display a message to the user that the file is already in use, and include the other user's ID in that message, so that the person using my application can contact that person and get them to close the file. I think I could just use the standard message that Excel gives you in that situation, but I'd prefer not to, partly because that includes an option to open a read-only version, which I don't want the users to select.
The way I see this working, is that the application would (try to) open all the required files at the start of the task, and if it reached a problem with any of them it would display a clear message to the user, identifying the other user, and then shut down. IF all the required files were opened successfully, only then would it go on to perform the main tasks.
Any ideas on this ?
Thanks again in advance for any help.