View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Checking for Open Workbook

The original code did that - the new code I posted does not.

If you suppress that message, then I am not sure whether it re-opens it or
not. Generally suppressing the message takes the default action which
appears to be to reopen the workbook - which could result in loss of data.

To suppress messages

Application.DisplayAlerts = False

' code that would cause the alert

Application.DisplayAlerts = True

But like I said, the second set of code does not try to open the workbook if
it is already open.

--
Regards,
Tom Ogilvy


"sbharbour" wrote in message
...
It does try to open the book that is already open, but what I want to do
is suppress the message box telling that it's already open reopening
will cause changes to be discarded, do you want to reopen Yes No

???