• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to check if the user has already opened the file

ThrottleWorks

Excel Ninja
Hi,

I am using below mentioned code to open a file.

How do I check if the user has already opened the file.
If the file is already open then I want to inform user and exit sub.

I do not know how do I check this. Can anyone help me in this please.

Code:
Application.EnableEvents = False
        Workbooks.Open shMacro.Range("a1").Value
Application.EnableEvents = True

Set File1 = ActiveWorkbook
 
Back
Top