Thread: Shared Workbook
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mark Ivey Mark Ivey is offline
external usenet poster
 
Posts: 120
Default Shared Workbook

I would run this one from Ozgrid first and have it return a TRUE or FALSE to
decide on the rest of your code...


http://www.ozgrid.com/VBA/IsWorkbookOpen.htm#ONE




"GeoffG" wrote in message
...
I've written VBA code to open a shared Workbook and make changes. I need
my code to determine whether another user has the Workbook open and
whether, as a consequence, my code is opening a read-only copy of the
Workbook - in which case, the code needs to abandon making changes, with
advice to the user to try again later.

Can I programmatically attempt to open a workbook in exclusive mode and
then see if the Workbook opened? Or is there a property I can examine
after the Workbook has opened to determine whether it's in read-only mode?

TIA
Geoff.