Berduş hocamızın kodunu alttaki gibide deneyebilirsiniz.
Dim ktap As Workbook
For Each ktap In Workbooks
If ktap.ReadOnly Then
MsgBox "Bu dosya zaten kullanýmda. Sonra tekrar deneyin."
If Workbooks.Count = 1 Then Application.Quit Else ktap.Close
End If
Next
Set ktap = Nothing