View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA Detection of Workbook already Open

these show you how to check:


http://support.microsoft.com?kbid=138621
XL: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=291295
XL2002: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=213383
XL2000: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=184982
WD97: VBA Function to Check If File or Document Is Open


--
Regards,
Tom Ogilvy

"Nigel" wrote in message
...
I have a workbook that runs on a network and wish to
intercept if any user has the file open. At the moment
the standard Excel message appears with the option to open
it read only etc.

My intention is prevent users from doing anything if the
workbook is already open, display a message to this effect
and then close the file.

TIA
Nigel