Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Read Only Problem - Excel
I have the following code which opens a spreadsheet and writes to it. If the spreadsheet is already in use by someone else then it throws up a message box and stops the macro.
Is it possible to pick up which user has the docuement open so I can ring them and tell them to get out! I have tried the Application.UserName property but this just returns my name!!!
If Workbooks("Tracking_system").ReadOnly = True Then
MsgBox ("The Workbook is already open by ..........")
0 · ·