Check if an Excel workbook is opened and in use by somebody else

Hi,

I need to check if a workbook is opened and in use by someone else.

workbooks.open does not return a trappable error




Answer this question

Check if an Excel workbook is opened and in use by somebody else

  • ducmis

    Excellent, thank you, the second worked very well. Now the second problem is to find out who that "somebody else"-person on the network using the workbook is.

    I know this is returned in an errormessage when I try to open the workbook directly from Excel, but I cannot find out who the person is when opening from a VBA routine.



  • jucho

    Hi,

    Have at a look at these 2 options for checking a file.
    http://www.xldynamic.com/source/xld.FileOpen.html


  • Yorik

    How about the WriteReservedBy property of the workbook. May not work in networked situations. In which case may using some like this to get open files and username.
    http://vbnet.mvps.org/index.html code/network/netfileenum.htm


  • Check if an Excel workbook is opened and in use by somebody else