I thought this code might prohibt the user from closing the workbook if there is not a range named "NOI", but it is not working. Can somebody help.
Sub Auto_Close()
For Each Name In ActiveWorkbook.Names
If Name.Name <> "NOI" Then
Workbook.Close = False
End If
Next
End Sub
Sub Auto_Close()
For Each Name In ActiveWorkbook.Names
If Name.Name <> "NOI" Then
Workbook.Close = False
End If
Next
End Sub