Grazie rollis non l'avevo notato in caso di più excel aperti, in effetti si chiudevano tutti.
Ho aggiunto la riga come mi hai detto:
'===============================================================================================
Private Sub Workbook_Open()
Dim blnReadonly As Boolean '<<< x autoclose readyonly
Dim avviso As String
Dim AckTime As Integer, InfoBox As Object
'--------------------------------------------------------------------------
'autoclose lettura
Application.EnableCancelKey = xlDisabled '<<<< disabilita debug CTRL+PAUSE
Application.DisplayAlerts = False
blnReadonly = ThisWorkbook.ReadOnly
If blnReadonly = True Then
Application.Visible = False '<<<< excel non visibile
avviso = MsgBox("Sign. " & Environ("UserName") & Chr(13) & _
"l'applicazione < xxxxxxxxxx > è già aperta da altro utente" & Chr(13) & _
"e non può essere aperta in lettura." & Chr(13) & _
"Riprova più tardi", vbCritical + vbOKOnly, "AVVISO!")
Application.Visible = True '<<<< excel visibile
'Application.Quit ' chiude tutto excel
ThisWorkbook.Close 'chiude solo 1 excel
End If
If blnReadonly = False Then
Application.DisplayAlerts = True
Application.EnableCancelKey = xlInterrupt '<<<< riattiva debug CTRL+PAUSE
'If blnReadonly = False Then
'--------------------------------------------------------------------------
'avviso avvio
'altri avvisi qui
'--------------------------------------------------------------------------
End If
Application.ScreenUpdating = True
End Sub
'===============================================================================================
max