View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cumberland[_9_] Cumberland[_9_] is offline
external usenet poster
 
Posts: 1
Default Check if workbook is already open...


Is there a VBA command to check if a workbook is already open? I want to
be able to see if the workbook is already open before even attempting to
open it. Basically, I want the system to wait 5 seconds and then
re-check. If file is open, wait 5 seconds and retry. If not open, then
open it. The file in question is literally opened, an entry added, then
saved and closed, all in a macro. It is a quick operation, but
nonetheless I need to ensure that no one else can open the file, even
in read-only mode, even if there is only a very remote chance that they
could.

Thanks in anticipation.


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile: http://www.excelforum.com/member.php...o&userid=33445
View this thread: http://www.excelforum.com/showthread...hreadid=574066